Skip to content
Snippets Groups Projects
Commit 83145f0b authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

Latest default theme and corretion on notes conversion

parent 84de6f5f
No related branches found
No related tags found
1 merge request!103Vivliostyle converter
Pipeline #3118 failed with stage
in 11 minutes and 1 second
...@@ -69,7 +69,7 @@ module.exports = ($, fragmentTitle, bookTitle, fragmentDivision, fragmentSubcate ...@@ -69,7 +69,7 @@ module.exports = ($, fragmentTitle, bookTitle, fragmentDivision, fragmentSubcate
$('extract-poetry').each(replaceWithBlockquote('px')) $('extract-poetry').each(replaceWithBlockquote('px'))
$('epigraph-poetry').each(replaceWithBlockquote('sepo')) $('epigraph-poetry').each(replaceWithBlockquote('sepo'))
$('epigraph-prose').each(replaceWithBlockquote('sep')) $('epigraph-prose').each(replaceWithBlockquote('sep'))
$('bibliography-entry').each(replaceWithBlockquote('bibliography-entry')) $('bibliography-entry').each(replaceWithParagraph('bibliography-entry'))
$('comment').each(replaceWithText) $('comment').each(replaceWithText)
// $('chapter-number').each(replaceWithParagraph('sc-chapter-number')) // $('chapter-number').each(replaceWithParagraph('sc-chapter-number'))
$('chapter-title').each(replaceWithParagraph('ct')) $('chapter-title').each(replaceWithParagraph('ct'))
...@@ -104,17 +104,20 @@ module.exports = ($, fragmentTitle, bookTitle, fragmentDivision, fragmentSubcate ...@@ -104,17 +104,20 @@ module.exports = ($, fragmentTitle, bookTitle, fragmentDivision, fragmentSubcate
const id = $elem.attr('data-id') const id = $elem.attr('data-id')
const content = `${i + 1}. ${$elem.attr('note-content')}` const content = `${i + 1}. ${$elem.attr('note-content')}`
const sup = $('<sup/>').text(`${i + 1}`) // const sup = $('<sup/>').text(`${i + 1}`)
$('<aside epub:type="footnote" class="footnote"/>') // const noteContent = $('<span class="inline-footnote" />')
.attr('id', id) // .attr('data-note-num', id)
.html(content) // .html(content)
.appendTo(body) // $('<aside epub:type="footnote" class="footnote"/>')
// .attr('id', id)
const callout = $('<a epub:type="noteref" class="footnoteRef"/>') // .html(content)
.attr('href', '#' + id) // .appendTo(body)
.append(sup)
const callout = $(`<a class="footnoteRef" href="#${id}"><sup>${i + 1}</sup></a><span class="inline-footnote" data-note-num="${id}">${content}</span>`)
// .attr('href', '#' + id)
// .append(sup)
// const outcome = noteContent.after(callout)
$elem.replaceWith(callout) $elem.replaceWith(callout)
}) })
......
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment