Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit e8e8b01

Browse files
authored
Add files via upload
my homework
1 parent f3370e0 commit e8e8b01

File tree

13 files changed

+195
-0
lines changed

13 files changed

+195
-0
lines changed

Week1/homework/homework/app.js

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
'use strict';
2+
{
3+
const bookTitles = ["zakerat_jasad","alasoad_yaliq_beke","kabo_alabaseen","hokol_aldam","yakfik_khalb_wahed","ant_li","shifret_divinchi","ontha_abria","alf_lila_wlila","ghoyom"
4+
];
5+
6+
const bookInfo = {
7+
"zakerat_jasad":{
8+
"title":"Zakerat Jasad",
9+
"language":"Arabic",
10+
"auther":"Ahlam Mostaghanmi"
11+
},
12+
"alasoad_yaliq_beke":{
13+
"title":"Alasoad Yaliq Beke",
14+
"language":"Arabic",
15+
"auther":"Ahlam Mostaghanmi"
16+
},
17+
"kabo_alabaseen":{
18+
"title":"Kabo Alabaseen",
19+
"language":"Arabic",
20+
"auther":"Haifaa Bitar"
21+
},
22+
"hokol_aldam":{
23+
"title":"Hokol Aldam",
24+
"language":"Arabic",
25+
"auther":"Khathren"
26+
},
27+
"yakfik_khalb_wahed":{
28+
"title":"Yakfik Khalb Wahed",
29+
"language":"Arabic",
30+
"auther":"Haifaa Bitar"
31+
},
32+
"ant_li":{
33+
"title":"Ant Li",
34+
"language":"Arabic",
35+
"auther":"Ahlam Mostaghanmi"
36+
},
37+
"shifret_divinchi":{
38+
"title":"Shifret Divinchi",
39+
"language":"Arabic",
40+
"auther":"Dan Broun"
41+
},
42+
"ontha_abria":{
43+
"title":"Ontha Abria",
44+
"language":"Arabic",
45+
"auther":"Ahlam Mostaghanmi"
46+
},
47+
"alf_lila_wlila":{
48+
"title":"Alf Lila Wlila",
49+
"language":"Arabic",
50+
"auther":"Ahlam"
51+
},
52+
"Nsian":{
53+
"title":"Ghoyom",
54+
"language":"Arabic",
55+
"auther":"Ahlam Mostaghanmi"
56+
}
57+
58+
}
59+
let bookCovers = {"zakerat_jasad":"./img/IMG_2596.JPG",
60+
"alasoad_yaliq_beke":"./img/IMG_2591.png",
61+
"kabo_alabaseen":"./img/IMG_2592.JPG",
62+
"hokol_aldam":"./img/IMG_2593.png",
63+
"yakfik_khalb_wahed":"./img/IMG_2594.JPG",
64+
"ant_li":"./img/IMG_2595.JPG",
65+
"shifret_divinchi":"./img/IMG_2597.JPG",
66+
"ontha_abria":"./img/IMG_2598.JPG",
67+
"alf_lila_wlila":"./img/IMG_2599.JPG",
68+
"Nsian":"./img/gh.jpg"
69+
}
70+
71+
72+
73+
// Replace with you own code
74+
// function createBookList(books){
75+
76+
// let list = document.createElement("UL");
77+
// document.body.appendChild(list) ;
78+
// list.setAttribute("id","book_list");
79+
// for(let i = 0; i < books.length; i++){
80+
// let li = document.createElement("LI");
81+
// let title = document.createTextNode(books[i]);
82+
// li.appendChild(title);
83+
// list.appendChild(li);
84+
85+
// }
86+
87+
// }
88+
89+
function createBookList(books){
90+
91+
let list = document.createElement("UL");
92+
document.body.appendChild(list) ;
93+
list.setAttribute("id","book_list");
94+
for(let i in books){
95+
let li = document.createElement("LI");
96+
li.setAttribute("ID",i);
97+
let header = document.createElement("H1");
98+
let headerText = document.createTextNode(books[i].title)
99+
header.appendChild(headerText);
100+
101+
let language = document.createElement("P");
102+
let languageText = document.createTextNode(books[i].language);
103+
language.appendChild(languageText);
104+
105+
106+
let auther = document.createElement("P");
107+
let autherText = document.createTextNode(books[i].auther);
108+
auther.appendChild(autherText);
109+
li.appendChild(header);
110+
li.appendChild(language);
111+
li.appendChild(auther);
112+
list.appendChild(li);
113+
114+
}
115+
116+
}
117+
118+
createBookList(bookInfo);
119+
120+
121+
122+
function covering (covers){
123+
let coversArray = Object.keys(covers);
124+
console.log(coversArray);
125+
for (let i = 0; i < coversArray.length; i++){
126+
let img = document.createElement("IMG");
127+
img.setAttribute("src",covers[coversArray[i]]);
128+
document.getElementById(coversArray[i]).appendChild(img);
129+
console.log(coversArray[i]);
130+
}
131+
132+
133+
}
134+
135+
136+
137+
138+
covering(bookCovers);
139+
console.log(bookCovers);
140+
}
680 KB
Loading
19.3 KB
Loading
69.2 KB
Loading
149 KB
Loading
129 KB
Loading
27.3 KB
Loading
14.6 KB
Loading
25 KB
Loading
38.7 KB
Loading

Week1/homework/homework/img/gh.jpg

41.2 KB
Loading

Week1/homework/homework/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- replace this with your HTML content -->
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<link rel="stylesheet" href="style.css">
9+
10+
<title>Document</title>
11+
12+
</head>
13+
14+
<body>
15+
</body>
16+
<script src="app.js"></script>
17+
</html>

Week1/homework/homework/style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* add your styling here */
2+
3+
body{
4+
display:block;
5+
width:100%;
6+
margin-left:0px;
7+
8+
9+
10+
}
11+
ul {
12+
display:flex;
13+
flex-wrap: wrap;
14+
flex-direction: row;
15+
width: 100%;
16+
list-style-type: none;
17+
18+
19+
20+
21+
}
22+
h1{
23+
font-size: 20px;
24+
}
25+
p{
26+
font-size: 15px;
27+
}
28+
li{
29+
width: 30%;
30+
margin: 5px;
31+
padding: 10px;
32+
background-color: rgb(152, 230, 28);
33+
34+
}
35+
img{
36+
width:100%;
37+
38+
}

0 commit comments

Comments
 (0)