mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-01-30 22:57:56 +00:00
Update chat block output formatting
If there's any formatting here in the first place.
This commit is contained in:
parent
928cd80561
commit
42454be244
@ -17,10 +17,12 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
# contains two output: the dialog image of our avatar and its content.
|
||||
attrs['name'] ||= attrs['avatar']
|
||||
|
||||
block << (create_html_fragment block, %(
|
||||
block << (create_html_fragment block, <<~HTML
|
||||
<div role="figure" class="dialogblock dialogblock__box dialogblock__avatar--#{attrs['avatar']} #{attrs['role']}">
|
||||
<div class="dialogblock dialogblock__avatar">
|
||||
))
|
||||
HTML
|
||||
|
||||
)
|
||||
|
||||
attrs['avatarsdir'] ||= File.expand_path('./avatars', attrs['iconsdir'])
|
||||
attrs['avatarstype'] ||= parent.attributes['avatarstype'] || 'avif'
|
||||
@ -33,18 +35,20 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
avatar_imgblock = create_image_block block, avatar_img_attrs
|
||||
|
||||
block << avatar_imgblock
|
||||
block << (create_html_fragment block, %(
|
||||
block << (create_html_fragment block, <<~HTML
|
||||
</div>
|
||||
<div class="dialogblock dialogblock__text">
|
||||
<small class="dialogblock dialogblock__avatar-name">#{attrs['name']}</small>
|
||||
))
|
||||
HTML
|
||||
)
|
||||
|
||||
parse_content block, reader
|
||||
|
||||
block << (create_html_fragment block, %(
|
||||
block << (create_html_fragment block, <<~HTML
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
HTML
|
||||
)
|
||||
|
||||
block
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user