cafeyn improve dropcap
This commit is contained in:
parent
a2bdf984fc
commit
64cc817bc9
10
epub.php
10
epub.php
|
@ -225,6 +225,7 @@
|
|||
|
||||
foreach ($article->content->sections as $section)
|
||||
{
|
||||
$dropcap = '';
|
||||
foreach ($section->items as $item)
|
||||
{
|
||||
if ($item->type == 'text')
|
||||
|
@ -241,8 +242,17 @@
|
|||
{
|
||||
$content .= '<p><b>' .$item->content . '</b></p>';
|
||||
}
|
||||
else if ($item->class == 'dropcap')
|
||||
{
|
||||
$dropcap = $item->content;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dropcap)
|
||||
{
|
||||
$item->content = '<b>' . $dropcap . '</b>' . $item->content;
|
||||
$dropcap = '';
|
||||
}
|
||||
$content .= '<p>' . $item->content . '</p>';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue