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