kepubify fix and tag fix

This commit is contained in:
daniel-j 2018-03-26 21:48:28 +02:00
parent ce170fad35
commit d33f0d4782
3 changed files with 14 additions and 12 deletions

View file

@ -55,7 +55,7 @@ function textToSpans (node, text, state) {
const span = createSpan(state.paragraph, state.segment++) const span = createSpan(state.paragraph, state.segment++)
span.text = sentence span.text = sentence
return span return span
}).filter(el => el) })
} }
function addSpansToNode (node, parent, state) { function addSpansToNode (node, parent, state) {

View file

@ -45,6 +45,7 @@
border-radius: 4px; border-radius: 4px;
font-size: .8125rem; font-size: .8125rem;
vertical-align: 4px; vertical-align: 4px;
margin-right: 0.4em;
margin-right: .3125rem; margin-right: .3125rem;
font-family: sans-serif; font-family: sans-serif;
@ -73,9 +74,14 @@
margin-bottom: 0.6em; margin-bottom: 0.6em;
text-align: left !important; text-align: left !important;
font-size: 0.8em; font-size: 0.8em;
.tagbox {
display: inline-block;
padding-right: 5px;
padding-right: 0.3em;
}
} }
.story-tag { .story-tag {
display: inline-block; display: inline;
padding: 0.3em 0.5em; padding: 0.3em 0.5em;
margin-bottom: 0.3em; margin-bottom: 0.3em;
line-height: 1.0em; line-height: 1.0em;

View file

@ -439,11 +439,9 @@ export function createTitlePage (ffc) {
m('section.author', ['by ', m('b', ffc.storyInfo.author.name)]) m('section.author', ['by ', m('b', ffc.storyInfo.author.name)])
]), ]),
// m('hr'), // m('hr'),
m('section.tags', [ m('section.tags', ffc.tags.filter((tag) => tag.type !== 'character').map((tag) =>
ffc.tags.filter((tag) => tag.type !== 'character').map((tag) => [m('span.tagbox', m('span', {className: tag.className}, tag.name))]
[m('div', {className: tag.className}, tag.name), ' '] )),
)
]),
m('.readlink', m('a', {href: ffc.storyInfo.url}, 'Story on Fimfiction')), m('.readlink', m('a', {href: ffc.storyInfo.url}, 'Story on Fimfiction')),
// m('hr'), // m('hr'),
ffc.storyInfo.prequel ? [m('div', [ ffc.storyInfo.prequel ? [m('div', [
@ -464,11 +462,9 @@ export function createTitlePage (ffc) {
ffc.options.calculateReadingEase && ffc.readingEase ? infoBox('Reading Ease', (Math.round(ffc.readingEase.ease * 100) / 100).toLocaleString('en-GB')) : null ffc.options.calculateReadingEase && ffc.readingEase ? infoBox('Reading Ease', (Math.round(ffc.readingEase.ease * 100) / 100).toLocaleString('en-GB')) : null
]), ]),
// m('hr'), // m('hr'),
m('section.tags', [ m('section.tags', ffc.tags.filter((tag) => tag.type === 'character').map((tag) =>
ffc.tags.filter((tag) => tag.type === 'character').map((tag) => [m('span.tagbox', m('span', {className: tag.className}, tag.name))]
[m('div', {className: tag.className}, tag.name), ' '] ))
)
])
])) ]))
]) ])
, {strict: true}).then((titlePage) => { , {strict: true}).then((titlePage) => {