-
Notifications
You must be signed in to change notification settings - Fork 1
Added blockquote layout #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mix
Are you sure you want to change the base?
Conversation
components/blockquote/Component.php
Outdated
| use Illuminate\View\Component; | ||
| use Whitecube\BemComponents\HasBemClasses; | ||
|
|
||
| class blockquote extends Component |
There was a problem hiding this comment.
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 ?
components/blockquote/Layout.php
Outdated
| return [ | ||
| DataList::make() | ||
| ->row('Text', TextComponent::make($this->text)) | ||
| ->row('Author', TextComponent::make($this->author ?? '--')), |
There was a problem hiding this comment.
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.
components/blockquote/view.blade.php
Outdated
| <blockquote class="blockquote__quote"> | ||
| {{ $text }} | ||
| </blockquote> | ||
| @if($author) | ||
| <cite class="blockquote__author">{{ $author }}</cite> | ||
| @endif |
There was a problem hiding this comment.
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 :
- https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite
- https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element
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
No description provided.