diff --git a/README.md b/README.md deleted file mode 100644 index 8bb0ae3..0000000 --- a/README.md +++ /dev/null @@ -1,40 +0,0 @@ -

-

تمرين

- - -

- -### اليوم راح نسوي لعبة cookie clicker ! 🍪 -##### الهدف من اللعبة إنك لما تطق على الكوكيزة يزيد عندك السكور 😄 - -

-the result -
- - -

-

-

- الخطوات

- -1. قم بعمل Fork -2. افتح الـrepo في github desktop -3. من برنامج github desktop اضغط على open in visual studio code -4. افتح ملف script.js وابدأ الحل -5. قم بإنشاء *متغير* باسم score واجعل قيمته = 0 -6. قم بإنشاء *متغير* باسم scoreHTML واجعل قميته = عنصر الـhtml الذي يحتوي على "id="score -
`ملاحظة مهمة: يجب أن تستخدم ('...')document.getElementById` -8. قم بإنشاء دالة باسم ()increaese `لا تنسى عشان نعرف دالة نستخدم كلمة function` - - داخل هذه الدالة قم بزيادة المتغير score بمقدار 1 - - ثم قم باستدعاء المتغير scoreHTML واجعل قيمة الـhtml الداخليه له = المتغير score `ملاحظة مهمة: يجب أن تستخدم scoreHTML.innerHTML` -9. اذهب إلى وسم img في صفحة `index.html` واستخدم حدث onclick وقم باستدعاء الدالة `()increase` -10. احفظ التغييرات وقم بعمل commit و push -11. قم بتسليم التمرين على موقع Coded Lab - -

-بونص! ✨

- -- قم بإنشاء دالة باسم ()welcome، هذه الدالة سوف تأخذ اسم المستخدم وتقوم بعرضه في صفحة الموقع للترحيب فيه، لا تنسى استدعاء الدالة في نهاية صفحة الجافاسكريبت عند الإنتهاء من كتابتها -

-"لا تترددون أنكم تسألون المدرسين 👌" -

diff --git a/assets/img/cookie.png b/assets/img/cookie (1).png similarity index 100% rename from assets/img/cookie.png rename to assets/img/cookie (1).png diff --git a/assets/video/result.gif b/assets/img/result.gif similarity index 100% rename from assets/video/result.gif rename to assets/img/result.gif diff --git a/index.html b/index.html index 2ef2015..5a4e437 100644 --- a/index.html +++ b/index.html @@ -15,9 +15,9 @@

Your score is:

- Click me! + Click me!
- + - + \ No newline at end of file diff --git a/script.js b/script.js deleted file mode 100644 index e69de29..0000000 diff --git a/scripts.js b/scripts.js new file mode 100644 index 0000000..0ce5c26 --- /dev/null +++ b/scripts.js @@ -0,0 +1,6 @@ +let score = 0; +let scoreHTML = document.getElementById("score"); +function increase(){ + score=score+1 + scoreHTML.innerHTML=score; +} diff --git a/styel.css b/styel.css new file mode 100644 index 0000000..e17ac4e --- /dev/null +++ b/styel.css @@ -0,0 +1,62 @@ + + +* { + margin: 0; + padding: 0; + } + + body { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100vh; + font-family: "Handjet", cursive; + background: rgb(181, 149, 116); + background: linear-gradient( + 288deg, + rgba(181, 149, 116, 1) 0%, + rgba(255, 223, 190, 1) 100% + ); + background-position: center center; + background-size: cover; + background-attachment: fixed; + background-repeat: no-repeat; + } + + .score-container { + display: flex; + align-items: center; + justify-content: space-evenly; + } + + h1 { + font-size: 60px; + } + + h3 { + font-size: 40px; + margin: 10px; + } + + p { + font-size: 40px; + margin: 10px; + } + + .img-container { + width: 512px; + height: 512px; + display: flex; + justify-content: center; + align-items: center; + } + + img:active { + width: 480px; + height: 480px; + } + + img:hover { + cursor: pointer; + } \ No newline at end of file diff --git a/style.css b/style.css deleted file mode 100644 index 99c4c88..0000000 --- a/style.css +++ /dev/null @@ -1,62 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Handjet:wght@100;200;300;400;500;600;700;800;900&display=swap"); - -* { - margin: 0; - padding: 0; -} - -body { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 100vh; - font-family: "Handjet", cursive; - background: rgb(181, 149, 116); - background: linear-gradient( - 288deg, - rgba(181, 149, 116, 1) 0%, - rgba(255, 223, 190, 1) 100% - ); - background-position: center center; - background-size: cover; - background-attachment: fixed; - background-repeat: no-repeat; -} - -.score-container { - display: flex; - align-items: center; - justify-content: space-evenly; -} - -h1 { - font-size: 60px; -} - -h3 { - font-size: 40px; - margin: 10px; -} - -p { - font-size: 40px; - margin: 10px; -} - -.img-container { - width: 512px; - height: 512px; - display: flex; - justify-content: center; - align-items: center; -} - -img:active { - width: 480px; - height: 480px; -} - -img:hover { - cursor: pointer; -}