mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-09-28 07:11:16 +12:00
some style fixes
This commit is contained in:
parent
cda5d0c1b3
commit
19194dea31
3 changed files with 19 additions and 26 deletions
|
@ -2,28 +2,15 @@
|
|||
@require 'mixins'
|
||||
@require 'reset'
|
||||
|
||||
@page {
|
||||
margin-top: 0.3em;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
color: black;
|
||||
text-align: justify;
|
||||
|
||||
-epub-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
|
||||
font-kerning: normal;
|
||||
font-variant: common-ligatures lining-nums;
|
||||
-webkit-font-feature-settings: "kern", "liga", "clig", "lnum";
|
||||
font-feature-settings: "kern", "liga", "clig", "lnum";
|
||||
// Ligatures on Kobo
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
// Fix for Webkit ereaders with zero margins. Such as Foliate.
|
||||
-webkit-line-box-contain: block glyphs replaced;
|
||||
}
|
||||
|
||||
a, u {
|
||||
|
@ -31,11 +18,9 @@ a, u {
|
|||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin: 0;
|
||||
text-indent: 0;
|
||||
|
||||
-epub-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
|
@ -48,6 +33,9 @@ p {
|
|||
-webkit-hyphenate-limit-lines: 2;
|
||||
hyphenate-limit-lines: 2;
|
||||
|
||||
widows: 1;
|
||||
orphans: 1;
|
||||
|
||||
&.double {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
@ -66,7 +54,6 @@ div p {
|
|||
h1, h2, h3, h4, h5, h6, header {
|
||||
text-align: left !important;
|
||||
adobe-hyphenate: none;
|
||||
-epub-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
|
@ -283,7 +270,6 @@ code {
|
|||
}
|
||||
pre {
|
||||
margin: 1em 0;
|
||||
-epub-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
|
@ -416,4 +402,3 @@ a.chaptercomments {
|
|||
background: -webkit-linear-gradient(top, #7bb042 0%, #6fa03c 100%);
|
||||
background: linear-gradient(to bottom, #7bb042 0%, #6fa03c 100%);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
.story_name {
|
||||
font-size: 1.5em;
|
||||
color: #222;
|
||||
opacity: 0.85;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
|||
.author {
|
||||
margin: 0;
|
||||
font-size: 0.97em;
|
||||
color: #444;
|
||||
opacity: 0.75;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
|
||||
|
|
|
@ -16,12 +16,14 @@ function nth (d) {
|
|||
}
|
||||
}
|
||||
|
||||
function prettyDate (d) {
|
||||
export function prettyDate (d) {
|
||||
// format: 27th Oct 2011
|
||||
let months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
return d.getDate() + nth(d) + ' ' + months[d.getMonth()].substring(0, 3) + ' ' + d.getFullYear()
|
||||
}
|
||||
|
||||
const metaGenerator = () => m('meta', { name: 'generator', content: 'Generated by fimfic2epub v' + FIMFIC2EPUB_VERSION + ' at ' + prettyDate(new Date()) })
|
||||
|
||||
function chapterBars (chapters, currentChapter = -1, highlightCurrent = false) {
|
||||
if (chapters.length <= 1) return null
|
||||
let windowSize = 50
|
||||
|
@ -87,6 +89,7 @@ export function createChapter (ffc, ch, isNotesChapter) {
|
|||
m('html', { xmlns: NS.XHTML, 'xmlns:epub': NS.OPS, lang: 'en' }, [
|
||||
m('head', [
|
||||
m('meta', { charset: 'utf-8' }),
|
||||
metaGenerator(),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: '../Styles/style.css' }),
|
||||
m('title', title)
|
||||
]),
|
||||
|
@ -312,6 +315,7 @@ export function createNav (ffc) {
|
|||
m('html', { xmlns: NS.XHTML, 'xmlns:epub': NS.OPS, lang: 'en' }, [
|
||||
m('head', [
|
||||
m('meta', { charset: 'utf-8' }),
|
||||
metaGenerator(),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: 'Styles/style.css' }),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: 'Styles/navstyle.css' }),
|
||||
m('title', 'Contents')
|
||||
|
@ -339,6 +343,7 @@ export function createNotesNav (ffc) {
|
|||
m('html', { xmlns: NS.XHTML, 'xmlns:epub': NS.OPS, lang: 'en' }, [
|
||||
m('head', [
|
||||
m('meta', { charset: 'utf-8' }),
|
||||
metaGenerator(),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: 'Styles/style.css' }),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: 'Styles/navstyle.css' }),
|
||||
m('title', 'Author\'s Notes')
|
||||
|
@ -373,6 +378,8 @@ export function createCoverPage (ffc) {
|
|||
return render(
|
||||
m('html', { xmlns: NS.XHTML, 'xmlns:epub': NS.OPS, lang: 'en' }, [
|
||||
m('head', [
|
||||
m('meta', { charset: 'utf-8' }),
|
||||
metaGenerator(),
|
||||
ffc.coverImage ? m('meta', { name: 'viewport', content: 'width=' + width + ', height=' + height }) : null,
|
||||
m('title', 'Cover'),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: '../Styles/coverstyle.css' })
|
||||
|
@ -428,6 +435,7 @@ export function createTitlePage (ffc) {
|
|||
m('html', { xmlns: NS.XHTML, 'xmlns:epub': NS.OPS, lang: 'en' }, [
|
||||
m('head', [
|
||||
m('meta', { charset: 'utf-8' }),
|
||||
metaGenerator(),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: '../Styles/style.css' }),
|
||||
m('link', { rel: 'stylesheet', type: 'text/css', href: '../Styles/titlestyle.css' }),
|
||||
m('title', ffc.storyInfo.title)
|
||||
|
|
Loading…
Reference in a new issue