diff --git a/epub.php b/epub.php index ddb36df..f9f50ee 100644 --- a/epub.php +++ b/epub.php @@ -470,6 +470,18 @@ $date = $finder->query('//span[@class="date"]')->item(0)->textContent; $summary = $finder->query('//div[@class="extrait"]')->item(0)->textContent; + // tranform "zoom" divs into aside tags + $zooms = $finder->query('//div[contains(@class,"gt_zoom")]'); + foreach ($zooms as $zoom) + { + $aside = $doc->createElement('aside'); + while ($zoom->childNodes->length > 0) + { + $aside->appendChild($zoom->childNodes->item(0)); + } + $zoom->parentNode->replaceChild($aside, $zoom); + } + $result = '

' . $title . '

'; $result .= '

' . $author . '

'; $result .= '

' . $date . '

';