Skip to content

Conversation

@FlorenceRandaxhe
Copy link
Member

No description provided.

use Illuminate\View\Component;
use Whitecube\BemComponents\HasBemClasses;

class blockquote extends Component
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut une majuscule ici, non ?

return [
DataList::make()
->row('Text', TextComponent::make($this->text))
->row('Author', TextComponent::make($this->author ?? '--')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le -- est la valeur par défaut si $this->author vaut null, donc pas besoin de le mettre.

Comment on lines 2 to 7
<blockquote class="blockquote__quote">
{{ $text }}
</blockquote>
@if($author)
<cite class="blockquote__author">{{ $author }}</cite>
@endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'après https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/blockquote ce sont des paragraphes qu'il faut mettre dans le contenu du blocquote. Du coup je te suggère simplement de passer le type de field à WYSIWYG, ça nous emmerdera moins par la suite.

Attention que <cite> ne sert pas à baliser l'auteur. C'est pour la source uniquement :

The cite element represents the title of a work (e.g. a book, a paper, [...])

A person's name is not the title of a work [...] and the element must therefore not be used to mark up people's names.

Il semblerait plus adéquat d'utiliser figure + blockquote + figcaption :)
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figure#quotations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants