import React from 'react'; import { CoverProps } from '@friends-library/types'; import Diamonds from './Diamonds'; import { overridable, formatBlurb, getHtmlFragments } from './helpers'; import Brackets from './Brackets'; import LogoSpanish from './LogoSpanish'; import Logo from './Logo'; type Props = Pick & { bgOnly?: boolean; style?: { [k in string]: number | string }; }; const Back: React.FC = ({ blurb, isbn, lang, edition, customHtml, bgOnly, style, }) => { const Diamond = Diamonds[lang === `es` ? `spanish` : edition]; const fragments = getHtmlFragments(customHtml); return (
{bgOnly !== true && ( <> {overridable( `blurb`, fragments,
{formatBlurb(blurb)}
, )} {isbn && ( )}

{lang === `es` ? ( <> La Biblioteca de los Amigos existe para compartir de forma gratuita los escritos de los primeros miembros de la Sociedad Religiosa de Amigos (Cuáqueros), creyendo que ninguna otra colección de escritos cristianos demuestra de manera más clara o convincente el poder transformador del evangelio de Jesucristo. ) : ( <> Friends Library Publishing exists to freely share the writings of early members of the Religious Society of Friends (Quakers), believing that no other collection of Christian writings more accurately communicates or powerfully illustrates the soul-transforming power of the gospel of Jesus Christ. )}

{lang === `es` ? ( <> Descarga este y otros libros gratis en{` `} www.bibliotecadelosamigos.org. ) : ( <> Download this and other books for free at{` `} www.friendslibrary.com. )}

{lang === `es` ? : } )}
); }; export default Back; function blurbClasses(blurb: string): string { const classes: string[] = []; for (let i = 150; i <= 1000; i += 25) { classes.push(`blurb--${blurb.length < i ? `lt` : `gte`}-${i}`); } return classes.join(` `); }