mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-31 04:58:26 +00:00
Add name and update styling to chat block extension
This commit is contained in:
parent
2bd03f9226
commit
468ab1f841
@ -241,6 +241,7 @@ p {
|
||||
gap: 1em;
|
||||
padding: 0.5em;
|
||||
max-width: 55ch;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
&__avatar {
|
||||
@ -262,7 +263,6 @@ p {
|
||||
|
||||
&__text {
|
||||
display: block;
|
||||
max-width: 50ch;
|
||||
margin: 0;
|
||||
|
||||
> :first-child {
|
||||
@ -270,6 +270,10 @@ p {
|
||||
}
|
||||
}
|
||||
|
||||
&__avatar-name {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
// Roles/modifiers.
|
||||
&.reversed {
|
||||
flex-direction: row-reverse;
|
||||
|
@ -18,7 +18,7 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
attrs['name'] ||= attrs['avatar']
|
||||
|
||||
block << (create_html_fragment block, %(
|
||||
<div class="dialogblock dialogblock__box dialogblock__avatar--#{attrs['avatar']} #{attrs['role']}" title="#{attrs['avatar']}">
|
||||
<div role="figure" class="dialogblock dialogblock__box dialogblock__avatar--#{attrs['avatar']} #{attrs['role']}" title="#{attrs['avatar']}">
|
||||
<div class="dialogblock dialogblock__avatar">
|
||||
))
|
||||
|
||||
@ -35,6 +35,7 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
block << (create_html_fragment block, %(
|
||||
</div>
|
||||
<div class="dialogblock dialogblock__text">
|
||||
<small class="dialogblock dialogblock__avatar-name">#{attrs['name']}</small>
|
||||
))
|
||||
|
||||
parse_content block, reader
|
||||
|
Loading…
Reference in New Issue
Block a user