diff options
Diffstat (limited to 'theme/stylesheets')
-rw-r--r-- | theme/stylesheets/base/markdown.less | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | theme/stylesheets/base/mixins.less (renamed from theme/stylesheets/mixins.less) | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | theme/stylesheets/ebook.less | 147 | ||||
-rw-r--r-- | theme/stylesheets/ebook/base.less | 40 | ||||
-rw-r--r-- | theme/stylesheets/ebook/glossary.less | 28 | ||||
-rw-r--r-- | theme/stylesheets/ebook/summary.less | 57 | ||||
-rw-r--r-- | theme/stylesheets/ebook/variables.less | 5 | ||||
-rw-r--r-- | theme/stylesheets/epub.less | 3 | ||||
-rw-r--r-- | theme/stylesheets/mobi.less | 23 | ||||
-rw-r--r-- | theme/stylesheets/pdf.less | 20 | ||||
-rwxr-xr-x | theme/stylesheets/website.less | 2 |
11 files changed, 180 insertions, 151 deletions
diff --git a/theme/stylesheets/base/markdown.less b/theme/stylesheets/base/markdown.less index b2866b7..1e235a8 100644 --- a/theme/stylesheets/base/markdown.less +++ b/theme/stylesheets/base/markdown.less @@ -1,4 +1,4 @@ -.markdown-content(@md-color, @md-line-height) { +.markdown-content(@md-color: #000, @md-line-height: 1.6, @md-link-color: #4183c4) { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; line-height: 1.4; @@ -70,7 +70,7 @@ } a { - color: #4183c4; + color: @md-link-color; text-decoration: none; } diff --git a/theme/stylesheets/mixins.less b/theme/stylesheets/base/mixins.less index 9d28305..e932151 100755..100644 --- a/theme/stylesheets/mixins.less +++ b/theme/stylesheets/base/mixins.less @@ -1,4 +1,4 @@ -@import "base/markdown.less"; +@import "./markdown.less"; .link-inherit { color: inherit; diff --git a/theme/stylesheets/ebook.less b/theme/stylesheets/ebook.less index b7d6a60..c36b161 100755..100644 --- a/theme/stylesheets/ebook.less +++ b/theme/stylesheets/ebook.less @@ -1,146 +1 @@ -@import "mixins.less"; - -@import "ebook/variables.less"; - -body { - font-family: sans-serif; -} - -.pdf-footer { - margin-top: 20px; - padding-top: 10px; - border-top: 1px solid #eee; - color:#aaa; - - .footer-pages-count { - float:right; - } -} - -.pdf-header { - margin-top: 20px; - padding-bottom: 10px; - border-bottom: 1px solid #eee; - color: #aaa; -} - - -.page { - .markdown-content(#000, 1.6); - - pre, code, blockquote, tr, img, table, figure { - page-break-inside: avoid; - } - - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - - h1, h2, h3, h4, h5 { - page-break-after: avoid; - } - - // Section and first titles - .section { - > h1, > h2, > h3 { - margin-top: 0px; - } - } - - // Hide the title (only used to build PDF table of content) - .book-chapter { - display: none; - } - - // First page: table of contents - &.page-toc { - > h1 { - text-align: center; - } - - > ol { - margin: 0px; - padding: 0px; - } - - li { - list-style: none; - - .inner { - display: block; - border-bottom: 1px dotted #eee; - margin-bottom: 4px; - - a, span { - padding-right: 5px; - display: inline-block; - border-bottom: 1px solid #fff; - margin-bottom: -1px; - } - - span.page { - float: right; - padding-left: 5px; - } - } - - ol { - margin: 0px; - padding: 0px; - padding-left: 2em; - } - } - } - - // Glossary page - &.page-glossary { - > h1 { - text-align: center; - } - - .glossary { - margin-bottom: 40px; - - h2 { - a, a:hover { - color: inherit; - text-decoration: none; - } - } - - .glossary-index { - list-style: none; - margin: 0px; - padding: 0px; - - li { - display: inline; - margin: 0px 8px; - white-space: nowrap; - } - } - } - } -} - -// For LTR, fix direction of table of content -body.dir-rtl { - .page.page-toc { - li { - .inner { - .page { - float: left; - } - } - - ol { - margin: 0px; - padding: 0px; - padding-right: 2em; - } - } - } -} +@import "./ebook/base.less"; diff --git a/theme/stylesheets/ebook/base.less b/theme/stylesheets/ebook/base.less new file mode 100644 index 0000000..9f6937b --- /dev/null +++ b/theme/stylesheets/ebook/base.less @@ -0,0 +1,40 @@ +@import "../base/mixins.less"; +@import "./variables.less"; + +@import "./summary.less"; +@import "./glossary.less"; + +body { + font-family: @font-family-base; +} + +.page { + .markdown-content(#000, 1.6, @md-link-color: @link-color); + + pre, code, blockquote, tr, img, table, figure { + page-break-inside: avoid; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h1, h2, h3, h4, h5 { + page-break-after: avoid; + } + + // Section and first titles + .section { + > h1, > h2, > h3 { + margin-top: 0px; + } + } + + // Hide the title (only used to build PDF table of content) + .book-chapter { + display: none; + } +} diff --git a/theme/stylesheets/ebook/glossary.less b/theme/stylesheets/ebook/glossary.less new file mode 100644 index 0000000..44c7158 --- /dev/null +++ b/theme/stylesheets/ebook/glossary.less @@ -0,0 +1,28 @@ +.page-glossary { + > h1 { + text-align: center; + } + + .glossary { + margin-bottom: 40px; + + h2 { + a, a:hover { + color: inherit; + text-decoration: none; + } + } + + .glossary-index { + list-style: none; + margin: 0px; + padding: 0px; + + li { + display: inline; + margin: 0px 8px; + white-space: nowrap; + } + } + } +} diff --git a/theme/stylesheets/ebook/summary.less b/theme/stylesheets/ebook/summary.less new file mode 100644 index 0000000..4ff2a4b --- /dev/null +++ b/theme/stylesheets/ebook/summary.less @@ -0,0 +1,57 @@ +.page-toc { + > h1 { + text-align: center; + } + + > ol { + margin: 0px; + padding: 0px; + } + + li { + list-style: none; + + .inner { + display: block; + border-bottom: 1px dotted #eee; + margin-bottom: 4px; + + a, span { + padding-right: 5px; + display: inline-block; + border-bottom: 1px solid #fff; + margin-bottom: -1px; + } + + .page { + float: right; + padding-left: 5px; + } + } + + ol { + margin: 0px; + padding: 0px; + padding-left: 2em; + } + } +} + +// For LTR, fix direction of table of content +.dir-rtl { + .page-toc { + li { + .inner { + .page { + float: left; + } + } + + ol { + margin: 0px; + padding: 0px; + padding-right: 2em; + } + } + } +} diff --git a/theme/stylesheets/ebook/variables.less b/theme/stylesheets/ebook/variables.less index 4714151..dafae41 100644 --- a/theme/stylesheets/ebook/variables.less +++ b/theme/stylesheets/ebook/variables.less @@ -1 +1,4 @@ -@font-size-base: 13px; +@font-size-base: 13px; +@font-family-base: sans-serif; + +@link-color: #4183c4; diff --git a/theme/stylesheets/epub.less b/theme/stylesheets/epub.less new file mode 100644 index 0000000..16dd496 --- /dev/null +++ b/theme/stylesheets/epub.less @@ -0,0 +1,3 @@ +@import "./ebook/base.less"; + +@font-family-base: serif; diff --git a/theme/stylesheets/mobi.less b/theme/stylesheets/mobi.less new file mode 100644 index 0000000..a963197 --- /dev/null +++ b/theme/stylesheets/mobi.less @@ -0,0 +1,23 @@ +@import "./ebook/base.less"; + +@font-family-base: serif; +@link-color: #000; + +a { + color: #000; + text-decoration: underline !important; +} + +.page-toc { + li { + list-style-type: lower-alpha; + + .inner { + border: none; + + span.page { + display: none; + } + } + } +} diff --git a/theme/stylesheets/pdf.less b/theme/stylesheets/pdf.less new file mode 100644 index 0000000..4d1a99a --- /dev/null +++ b/theme/stylesheets/pdf.less @@ -0,0 +1,20 @@ +@import "./ebook/base.less"; + +.pdf-footer { + margin-top: 20px; + padding-top: 10px; + border-top: 1px solid #eee; + color:#aaa; + + .footer-pages-count { + float: right; + } +} + +.pdf-header { + margin-top: 20px; + padding-bottom: 10px; + border-bottom: 1px solid #eee; + color: #aaa; +} + diff --git a/theme/stylesheets/website.less b/theme/stylesheets/website.less index 2562201..11beb84 100755 --- a/theme/stylesheets/website.less +++ b/theme/stylesheets/website.less @@ -1,8 +1,8 @@ @import "base/normalize.less"; @import "base/preboot.less"; +@import "base/mixins.less"; @import "../../node_modules/font-awesome/less/font-awesome.less"; -@import "mixins.less"; @import "website/variables.less"; @import "website/languages.less"; |