diff --git a/assets/app.js b/assets/app.js index 30b2a3f..a55085e 100644 --- a/assets/app.js +++ b/assets/app.js @@ -9,6 +9,7 @@ import './styles/theme.css'; import './styles/app.css'; import './styles/layout.css'; import './styles/button.css'; +import './styles/card.css'; import './styles/article.css'; import './styles/form.css'; diff --git a/assets/styles/app.css b/assets/styles/app.css index fac862e..3672d01 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -13,7 +13,7 @@ body { h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font), serif; - font-weight: 300; + font-weight: 400; line-height: 1.1; color: var(--color-primary); margin: 0 0 10px; @@ -49,8 +49,11 @@ p { } .lede { - font-size: 1.5rem; + font-family: var(--main-body-font), serif; + font-size: 1.6rem; word-wrap: break-word; + margin: 20px 0; + font-weight: 300; } strong, .strong { @@ -145,13 +148,6 @@ svg.icon { margin-top: 10px; } -.lede { - font-size: 1.9em; - line-height: 1.25; - margin: 20px 0; - font-weight: lighter; -} - .header { text-align: center; z-index: 1000; /* Ensure it stays on top */ diff --git a/assets/styles/article.css b/assets/styles/article.css index db4388f..8497f97 100644 --- a/assets/styles/article.css +++ b/assets/styles/article.css @@ -7,14 +7,17 @@ .article-main ul, .article-main ol, .article-main blockquote, -.article-main table, -.lede { +.article-main table { font-family: var(--main-body-font), serif; color: var(--color-text-mid); font-size: 1.4rem; line-height: 1.75; } +.article-main .lede { + font-size: 1.9rem; +} + .article-main table { font-size: 1.3rem; } diff --git a/assets/styles/card.css b/assets/styles/card.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/assets/styles/card.css @@ -0,0 +1 @@ + diff --git a/src/Controller/AuthorController.php b/src/Controller/AuthorController.php index 7edc651..be5b500 100644 --- a/src/Controller/AuthorController.php +++ b/src/Controller/AuthorController.php @@ -13,10 +13,16 @@ use Symfony\Component\Routing\Attribute\Route; class AuthorController extends AbstractController { + /** + * @throws \Exception + */ #[Route('/p/{npub}', name: 'author-profile')] public function index($npub, EntityManagerInterface $entityManager): Response { $author = $entityManager->getRepository(User::class)->findOneBy(['npub' => $npub]); + if (!$author) { + throw new \Exception('No author found'); + } $articles = $entityManager->getRepository(Article::class)->findBy(['pubkey' => $npub], ['createdAt' => 'DESC']); diff --git a/templates/components/Molecules/Card.html.twig b/templates/components/Molecules/Card.html.twig index 6371e6f..871661e 100644 --- a/templates/components/Molecules/Card.html.twig +++ b/templates/components/Molecules/Card.html.twig @@ -8,6 +8,6 @@