La in dapper, och routing. fixade upp lite exempelsidor
This commit is contained in:
27
Frontend/src/components/AuthorCard.tsx
Normal file
27
Frontend/src/components/AuthorCard.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Show, type Component } from "solid-js";
|
||||
import { author } from "../types/types";
|
||||
import { Card } from "solid-bootstrap";
|
||||
|
||||
const AuthorCard: Component<{ author: author }> = (props: {
|
||||
author: author;
|
||||
}) => {
|
||||
return (
|
||||
<Card class="book-card col-lg-2 col-md-3 col-sm-4">
|
||||
<Card.Img
|
||||
variant="top"
|
||||
class="padding-1"
|
||||
src={"/api/biiblan/authorcover/" + encodeURIComponent(props.author.id)}
|
||||
/>
|
||||
<Card.Body>
|
||||
<Card.Title>{props.author.name}</Card.Title>
|
||||
<Card.Subtitle>
|
||||
<a href={`/books/author/${props.author.id}`}>
|
||||
{props.author.bookCount} books
|
||||
</a>
|
||||
</Card.Subtitle>
|
||||
</Card.Body>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default AuthorCard;
|
Reference in New Issue
Block a user