Skip to content

Commit 4d9feb7

Browse files
authored
Merge pull request #6 from NisanurBulut/dev-orhunFront
Dev orhun front is complated
2 parents d9f05b7 + ff39406 commit 4d9feb7

File tree

9 files changed

+64
-60
lines changed

9 files changed

+64
-60
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<article class="book-element" (click)="addToProfile(bookItem)">
2+
<div class="col-2">
3+
<img src="{{bookItem.imageLink}}" style="width: 160px;" />
4+
</div>
25
<div class="col-1">
3-
<h3>{{bookItem.title}}</h3>
6+
<h4>{{bookItem.title}}</h4>
7+
<h5>{{bookItem.authors}}</h5>
48
<p class="info">{{bookItem.description | slice: 0:150}}</p>
59
</div>
6-
<div class="col-2">
7-
<div class="author">{{bookItem.authors}}</div>
8-
<img src="{{bookItem.imageLink}}" />
9-
</div>
1010
</article>

Orhun/src/app/book-list/book-item/book-item.component.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.col-1 {
22
width: 60%;
3-
margin: 10px 10px 10px 10px;
3+
margin: 10px 10px 10px 0px;
44
}
55

66
.col-2 {
77
width: 40%;
8-
margin: 10px 10 10px 10px;
8+
display: flex;
99
}
1010
.col-1 h3 {
1111
font-size: 22px;
@@ -14,11 +14,11 @@
1414

1515
.book-element {
1616
display: flex;
17-
width: 100%;
17+
width: 500px;
1818
margin: 10px 10px 10px 10px;
1919
box-shadow: 3px 3px 10px #fff;
2020
border-radius: 5px;
21-
background-color: #61729c;
21+
background-color: #413c69;
2222
color: white;
2323
cursor: pointer;
2424
}

Orhun/src/app/book-list/book-list.component.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.some-page-wrapper {
22
margin: 15px;
3-
width: 60%;
3+
width: 100%;
44
}
55

66
.row {
@@ -19,17 +19,11 @@
1919

2020
.profile-column {
2121
position: relative;
22-
height: 100%;
23-
width: 100%;
24-
2522
display: flex;
2623
justify-content: center;
2724
}
2825

2926
.book-column {
30-
31-
height: 100%;
32-
width: 100%;
3327
display: flex;
3428
justify-content: center;
3529
}

Orhun/src/app/book-list/book-search/book-search.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
button {
19-
background-color: #2ecc71;
19+
background-color: #276678;
2020
border: none;
2121
border-radius: 0 5px 5px 0;
2222
box-shadow: 1px 1px 1px #95a5a6;

Orhun/src/app/db/profile.db.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
{
2-
"profiles": []
2+
"profiles": [
3+
{
4+
"profileName": "TLaODwAAQBAJ",
5+
"bookItem": {
6+
"id": "TLaODwAAQBAJ",
7+
"title": "J. K. Rowling",
8+
"description": "A new series of empowering biographies featuring modern women in the world of work. When Joanne Rowling was a young woman, she found herself down and out of luck. But, she had a best-selling idea and a tenacious spirit. If only she could find someone who wanted to publish her book... Discover how J. K. Rowling became a best-selling author and publishing sensation in this true story of her life. Then, learn 10 key lessons from her work you can apply to your own life.",
9+
"imageLink": "http://books.google.com/books/content?id=TLaODwAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
10+
"authors": "Caroline Moss",
11+
"infoLink": "http://books.google.com.tr/books?id=TLaODwAAQBAJ&dq=jk&hl=&source=gbs_api",
12+
"publisher": "Frances Lincoln Children's Books"
13+
},
14+
"id": 2
15+
},
16+
{
17+
"profileName": "Qc6nDwAAQBAJ",
18+
"bookItem": {
19+
"id": "Qc6nDwAAQBAJ",
20+
"title": "Be Bold, Baby: J.K. Rowling",
21+
"description": "Introduce your little ones to bold women like J.K. Rowling and important values like imagination, always being yourself, and being a good friend with this board book series! Celebrate J. K. Rowling's most motivational and powerful moments, with quotes from the literary genius responsible for the creation of Harry Potter and vibrant illustrations by Alison Oliver (Moon; BabyLit series.) Be imaginative. Be a friend. Be you. Each book ends with a mirror! Look for the companion volumes, Be Bold, Baby: Michelle Obama; Be Bold Baby: Oprah Winfrey; and Be Bold Baby: Sonia Sotomayor.",
22+
"imageLink": "http://books.google.com/books/content?id=Qc6nDwAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
23+
"authors": "Alison Oliver",
24+
"infoLink": "http://books.google.com.tr/books?id=Qc6nDwAAQBAJ&dq=jk&hl=&source=gbs_api",
25+
"publisher": "HMH Books For Young Readers"
26+
},
27+
"id": 3
28+
}
29+
]
330
}

Orhun/src/app/profile/profile.component.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ <h3 *ngIf="profiles.length > 0">Saved Profile</h3>
33
<article
44
#profile
55
class="profile"
6-
*ngFor="let profile of (profileList | async).profileList; let i=index"
6+
*ngFor="let profile of (profileList | async).profileList; let i = index"
77
(click)="onLoadProfile(profile)"
88
>
9-
<h4>{{ profile.bookItem.title }}</h4>
109
<div class="profile-content">
11-
<p>{{ profile.bookItem.authors }}</p>
12-
<br />
13-
<p style="font-style: italic">{{ profile.bookItem.publisher }}</p>
1410
<img src="{{ profile.bookItem.imageLink }}" />
11+
<div class="description">
12+
<ul>
13+
<li>{{ profile.bookItem.authors }}</li>
14+
<li>{{ profile.bookItem.publisher }}</li>
15+
</ul>
16+
</div>
1517
</div>
16-
<span (click)="onDeleteProfile($event, profile)" class="delete"></span>
18+
<span (click)="onDeleteProfile($event, profile)" class="delete">X</span>
1719
</article>

Orhun/src/app/profile/profile.component.scss

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,32 @@ h3 {
44
font-size: 18px;
55
}
66
.profile-content {
7-
margin: 0 20px 5px 10px;
8-
padding-right: 5px;
7+
margin: 20px 20px 5px 10px;
8+
padding: 10px;
9+
display: flex;
10+
width: 100%;
11+
}
12+
.description{
13+
margin-top: 2rem;
14+
margin-right:5px;
915
}
10-
1116
.profile {
12-
img {
13-
width: 50px;
14-
height: 50px;
15-
}
17+
color:#fff;
1618
position: relative;
17-
width: 400px;
18-
background-color: #8cb4ce;
19+
background-color: #ad6c80;
1920
cursor: pointer;
2021
border-radius: 5px;
21-
p {
22-
float: right;
23-
}
24-
h4 {
25-
margin-top: 5px;
26-
margin-left: 5px;
27-
margin-right: 5px;
28-
padding-top: 5px;
29-
font-style: italic;
30-
}
31-
32-
p {
33-
margin: 0;
34-
padding: 0;
35-
}
36-
22+
width: 500px;
3723
.delete {
3824
position: absolute;
39-
top: 2px;
40-
right: 5px;
41-
font-size: 14px;
42-
font-style: bold;
43-
}
44-
45-
.delete:hover {
46-
color: red;
25+
top: 10px;
26+
right: 10px;
27+
font-size: 18px;
28+
font-weight: bolder;
29+
color:#fff;
4730
}
4831
}
4932

5033
.profile:hover {
51-
background-color: #1e6566;
52-
color: rgb(245, 239, 239);
34+
background-color: #7b113a;
5335
}

Orhun/src/styles.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ body {
44
margin:0;
55
font-family: "Roboto", Arial, sans-serif;
66
font-size: 16px;
7-
background-color: rgb(102, 134, 36);
87
}
98
.center {
109
width:100%;

0 commit comments

Comments
 (0)