2024-08-05 15:14:49 -04:00
|
|
|
class Book:
|
|
|
|
|
|
|
|
def __init__(self, name: str, description: str, image: str, review: str) -> None:
|
|
|
|
self.name: str = name
|
|
|
|
self.description: str = description
|
|
|
|
self.image: str = image
|
|
|
|
self.review: str = review
|
|
|
|
|
|
|
|
def to_html(self) -> str:
|
|
|
|
return f"""
|
|
|
|
<tr>
|
2024-08-05 16:15:47 -04:00
|
|
|
<td class="image-div"><img src="img/{self.image}"></td>
|
|
|
|
<td class="namedesc-div">
|
|
|
|
<p class="name">{self.name}</p>
|
|
|
|
<p class="description">{self.description}</p>
|
|
|
|
</td>
|
|
|
|
<td class="review-div">{self.review}</td>
|
2024-08-05 15:14:49 -04:00
|
|
|
</tr>
|
|
|
|
"""
|