Browse Source

Styles

imwald
Nuša Pukšič 1 year ago
parent
commit
b1a1934e72
  1. 1
      assets/app.js
  2. 14
      assets/styles/app.css
  3. 7
      assets/styles/article.css
  4. 1
      assets/styles/card.css
  5. 6
      src/Controller/AuthorController.php
  6. 2
      templates/components/Molecules/Card.html.twig

1
assets/app.js

@ -9,6 +9,7 @@ import './styles/theme.css'; @@ -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';

14
assets/styles/app.css

@ -13,7 +13,7 @@ body { @@ -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 { @@ -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 { @@ -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 */

7
assets/styles/article.css

@ -7,14 +7,17 @@ @@ -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;
}

1
assets/styles/card.css

@ -0,0 +1 @@ @@ -0,0 +1 @@

6
src/Controller/AuthorController.php

@ -13,10 +13,16 @@ use Symfony\Component\Routing\Attribute\Route; @@ -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']);

2
templates/components/Molecules/Card.html.twig

@ -8,6 +8,6 @@ @@ -8,6 +8,6 @@
</p>
</div>
<div class="card-footer">
<small><twig:Molecules:UserFromNpub npub="{{ article.pubkey }}" /></small>
<a href="{{ path('author-profile', { npub: article.pubkey })}}"><twig:Molecules:UserFromNpub npub="{{ article.pubkey }}" /></a>
</div>
</{{ tag }}>

Loading…
Cancel
Save