generated from moevm/nsql-clean-tempate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
37 changed files
with
1,362 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {Link} from "react-router-dom"; | ||
import React from "react"; | ||
import "../css/DetailsAuthorCard.css" | ||
|
||
const DetailsAuthorCard = ({authorName, books, totalQuotes}) => { | ||
|
||
const encodeParam = (param) => encodeURIComponent(param); | ||
|
||
|
||
return ( | ||
<div className="details-author-card"> | ||
<p className="details-author-text">{authorName}</p> | ||
<div className="details-author-details"> | ||
<div className="books-container"> | ||
<span className="title-book">Произведения:</span> | ||
<span className="book-list"> | ||
{books.map((book, index) => ( | ||
<React.Fragment key={`${book.name}-${book.year}`}> | ||
<Link to={`/book/${encodeParam(book.name)}`} className="author-link"> | ||
{book.name} | ||
</Link> | ||
{index < books.length - 1 && ', '} | ||
</React.Fragment> | ||
))} | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-count">Количество цитат:</span> | ||
<span className="count">{totalQuotes}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DetailsAuthorCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react"; | ||
import {Link} from "react-router-dom"; | ||
import "../css/DetailsBookCard.css" | ||
|
||
const DetailsBookCard = ({bookName, year, heroes, author, totalQuotes}) => { | ||
|
||
const encodeParam = (param) => encodeURIComponent(param); | ||
|
||
|
||
return ( | ||
<div className="details-book-card"> | ||
<p className="details-book-text">{bookName}</p> | ||
<div className="details-book-details"> | ||
<div className="books-container"> | ||
<span className="title-author">Автор произведения:</span> | ||
<span> | ||
<Link to={`/author/${encodeParam(author)}`} className="book-link"> | ||
{author} | ||
</Link> | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-year">Год публикации:</span> | ||
<span className="year">{year}</span> | ||
</div> | ||
|
||
<div className="books-container"> | ||
<span className="title-heroe">Герои произведения:</span> | ||
<span className="heroe-list"> | ||
{heroes.map((hero, index) => ( | ||
<React.Fragment key={hero}> | ||
<Link to={`/hero/${encodeParam(hero)}`} className="book-link"> | ||
{hero} | ||
</Link> | ||
{index < heroes.length - 1 && ', '} | ||
</React.Fragment> | ||
))} | ||
</span> | ||
</div> | ||
|
||
<div> | ||
<span className="title-count">Количество цитат:</span> | ||
<span className="book-count">{totalQuotes}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DetailsBookCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from "react"; | ||
import "../css/DetailsCitationCard.css" | ||
import {Link} from "react-router-dom"; | ||
|
||
const DetailsCitationCard = ({quote, authorName, book, hero}) => { | ||
|
||
const encodeParam = (param) => encodeURIComponent(param); | ||
|
||
|
||
return ( | ||
<div className="details-citation-card"> | ||
<p className="details-citation-text">{quote}</p> | ||
<div className="details-citation-details"> | ||
<div> | ||
<span className="title-hero">Кому принадлежит:</span> | ||
<span className="hero-d"> | ||
{hero ? ( | ||
<Link to={`/hero/${encodeParam(hero)}`} className="citation-link"> | ||
{hero} | ||
</Link> | ||
) : ( | ||
"Слова автора" | ||
)} | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-author">Автор произведения:</span> | ||
<span className="author-d"> | ||
<Link to={`/author/${encodeParam(authorName)}`} className="citation-link"> | ||
{authorName} | ||
</Link> | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-book">Произведение:</span> | ||
<span className="book-d"> | ||
<Link to={`/book/${encodeParam(book.name)}`} className="citation-link"> | ||
{book.name} | ||
</Link> | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-book_year">Год публикации:</span> | ||
<span className="book_year-d">{book.year}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DetailsCitationCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Link} from "react-router-dom"; | ||
import React from "react"; | ||
import "../css/DetailsHeroCard.css" | ||
|
||
const DetailsHeroCard = ({heroName, books, authors}) => { | ||
const encodeParam = (param) => encodeURIComponent(param); | ||
|
||
return ( | ||
<div className="details-hero-card"> | ||
<p className="details-hero-text">{heroName}</p> | ||
<div className="details-hero-details"> | ||
<div> | ||
<span className="title-hero">Герой произведения:</span> | ||
<span className="hero-d"> | ||
<Link to={`/book/${encodeParam(books[0].name)}`} className="hero-link"> | ||
{books[0].name} | ||
</Link> | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-author">Автор произведения:</span> | ||
<span className="author-d"> | ||
<Link to={`/author/${encodeParam(authors)}`} className="hero-link"> | ||
{authors} | ||
</Link> | ||
</span> | ||
</div> | ||
<div> | ||
<span className="title-book_year">Год публикации:</span> | ||
<span className="book_year-d">{books[0].year} г</span> | ||
</div> | ||
|
||
{/*<div>*/} | ||
{/* <span className="title-count">Количество цитат:</span>*/} | ||
{/* <span className="book-count">{totalQuotesByHero}</span>*/} | ||
{/*</div>*/} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DetailsHeroCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.