diff options
author | Shaform <shaform@gmail.com> | 2014-06-17 22:08:46 +0800 |
---|---|---|
committer | Shaform <shaform@gmail.com> | 2014-06-17 22:08:46 +0800 |
commit | 6bbefad24e6aa4a5b51b4b21bdf30b73f8cb4d41 (patch) | |
tree | d2efbbb62f9746b19b683c11a302c9afe385a2be /theme/stylesheets | |
parent | 1f4cf33dd08b439cadb5c649654ecd6d3f4b399d (diff) | |
parent | d6eb8e4c6042262408c3c0b8d67bccecfa4bf882 (diff) | |
download | gitbook-6bbefad24e6aa4a5b51b4b21bdf30b73f8cb4d41.zip gitbook-6bbefad24e6aa4a5b51b4b21bdf30b73f8cb4d41.tar.gz gitbook-6bbefad24e6aa4a5b51b4b21bdf30b73f8cb4d41.tar.bz2 |
Merge remote-tracking branch 'upstream/master' into ref_links
Diffstat (limited to 'theme/stylesheets')
-rwxr-xr-x | theme/stylesheets/ebook.less | 40 | ||||
-rw-r--r-- | theme/stylesheets/ebook/highlight.less (renamed from theme/stylesheets/page/highlight.less) | 0 | ||||
-rw-r--r-- | theme/stylesheets/ebook/variables.less | 1 | ||||
-rwxr-xr-x | theme/stylesheets/mixins.less | 2 | ||||
-rwxr-xr-x | theme/stylesheets/print.less | 115 | ||||
-rwxr-xr-x | theme/stylesheets/website.less (renamed from theme/stylesheets/main.less) | 24 | ||||
-rwxr-xr-x | theme/stylesheets/website/body.less (renamed from theme/stylesheets/book/body.less) | 3 | ||||
-rwxr-xr-x | theme/stylesheets/website/exercise.less (renamed from theme/stylesheets/book/exercise.less) | 0 | ||||
-rw-r--r-- | theme/stylesheets/website/font-settings.less (renamed from theme/stylesheets/book/font-settings.less) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | theme/stylesheets/website/fonts.less (renamed from theme/stylesheets/fonts.less) | 64 | ||||
-rwxr-xr-x | theme/stylesheets/website/header.less (renamed from theme/stylesheets/book/header.less) | 8 | ||||
-rw-r--r-- | theme/stylesheets/website/highlight/night.less (renamed from theme/stylesheets/book/highlight/night.less) | 0 | ||||
-rw-r--r-- | theme/stylesheets/website/highlight/sepia.less (renamed from theme/stylesheets/book/highlight/sepia.less) | 0 | ||||
-rw-r--r-- | theme/stylesheets/website/highlight/white.less (renamed from theme/stylesheets/book/highlight/white.less) | 0 | ||||
-rwxr-xr-x | theme/stylesheets/website/languages.less (renamed from theme/stylesheets/book/languages.less) | 0 | ||||
-rwxr-xr-x | theme/stylesheets/website/markdown.less (renamed from theme/stylesheets/book/markdown.less) | 0 | ||||
-rwxr-xr-x | theme/stylesheets/website/navigation.less (renamed from theme/stylesheets/book/navigation.less) | 4 | ||||
-rwxr-xr-x | theme/stylesheets/website/progress.less (renamed from theme/stylesheets/book/progress.less) | 0 | ||||
-rw-r--r-- | theme/stylesheets/website/quiz.less (renamed from theme/stylesheets/book/quiz.less) | 0 | ||||
-rwxr-xr-x | theme/stylesheets/website/summary.less (renamed from theme/stylesheets/book/summary.less) | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | theme/stylesheets/website/variables.less (renamed from theme/stylesheets/variables.less) | 52 |
21 files changed, 102 insertions, 214 deletions
diff --git a/theme/stylesheets/ebook.less b/theme/stylesheets/ebook.less new file mode 100755 index 0000000..154c3bf --- /dev/null +++ b/theme/stylesheets/ebook.less @@ -0,0 +1,40 @@ +@import "mixins.less"; + +@import "ebook/variables.less"; +@import "ebook/highlight.less"; + +.book-chapter { + display: none; +} + + +pre, blockquote { + border: 1px solid #999; + page-break-inside: avoid; + background: #f1f1f1; + padding: 8px; +} + +img { + max-width: 100% !important; + page-break-inside: avoid; + margin: 0px auto; +} + +.exercise, .quiz { + margin: 1cm 0cm; + padding: 0.4cm; + page-break-inside: avoid; + + border: 3px solid #ddd; + + .exercise-header { + margin-bottom: 0.4cm; + padding-bottom: 0.2cm; + border-bottom: 1px solid #ddd; + } + + .question { + margin-top: 0.4cm; + } +} diff --git a/theme/stylesheets/page/highlight.less b/theme/stylesheets/ebook/highlight.less index 26078cb..26078cb 100644 --- a/theme/stylesheets/page/highlight.less +++ b/theme/stylesheets/ebook/highlight.less diff --git a/theme/stylesheets/ebook/variables.less b/theme/stylesheets/ebook/variables.less new file mode 100644 index 0000000..4714151 --- /dev/null +++ b/theme/stylesheets/ebook/variables.less @@ -0,0 +1 @@ +@font-size-base: 13px; diff --git a/theme/stylesheets/mixins.less b/theme/stylesheets/mixins.less index 0216ea4..80378f8 100755 --- a/theme/stylesheets/mixins.less +++ b/theme/stylesheets/mixins.less @@ -4,4 +4,4 @@ &:hover, &:focus { color: inherit; } -}
\ No newline at end of file +} diff --git a/theme/stylesheets/print.less b/theme/stylesheets/print.less deleted file mode 100755 index 2f31844..0000000 --- a/theme/stylesheets/print.less +++ /dev/null @@ -1,115 +0,0 @@ -@import "vendors/bootstrap/bootstrap.less"; -@import "vendors/fontawesome/font-awesome.less"; - -@import "mixins.less"; -@import "variables.less"; -@import "fonts.less"; - -@import "page/highlight.less"; - - -@font-size-base: 13px; - - -* { - -webkit-overflow-scrolling: touch; - -webkit-tap-highlight-color: transparent; - -webkit-text-size-adjust: none; - -webkit-touch-callout: none; - -webkit-font-smoothing: antialiased; -} - -html, body { - height: 100%; -} - -body { - text-rendering: optimizeLegibility; - font-smoothing: antialiased; - font-family: @font-family-base; -} - - -h1, h2, h3 { - page-break-after: avoid; - page-break-before: auto; -} - -h1 { font-size: floor(@font-size-base * 2.15); } -h2 { font-size: floor(@font-size-base * 1.70); } -h3 { font-size: ceil(@font-size-base * 1.25); } -h4 { font-size: ceil(@font-size-base * 1); } -h5 { font-size: ceil(@font-size-base * 0.85); } -h6 { font-size: ceil(@font-size-base * 0.65); } - -pre, blockquote { - border: 1px solid #999; - page-break-inside: avoid; -} - -img { - max-width: 100% !important; - page-break-inside: avoid; -} - -section { - page-break-after: always; - - &#cover { - padding: 3cm 0cm; - text-align: center; - - h1 { - font-size: 1.5cm; - } - } - - &#summary { - margin: 1.5cm; - - h1 { - text-align: center; - } - - ol { - list-style: none; - padding: 0px; - margin: 0px; - margin-left: 1cm; - } - - > ol { - > li { - } - } - } - - article { - margin-bottom: 1.5cm; - - &.new-chapter { - page-break-after: always; - font-size: 0.6cm; - text-align: center; - padding: 3cm 0cm; - - h1 { - font-size: floor(@font-size-base * 2.7); - } - } - - .exercise { - margin: 1cm 0cm; - padding: 0.4cm; - page-break-inside: avoid; - - border: 3px solid #ddd; - - .exercise-header { - margin-bottom: 0.4cm; - padding-bottom: 0.2cm; - border-bottom: 1px solid #ddd; - } - } - } -}
\ No newline at end of file diff --git a/theme/stylesheets/main.less b/theme/stylesheets/website.less index 2145d43..ffaae57 100755 --- a/theme/stylesheets/main.less +++ b/theme/stylesheets/website.less @@ -2,19 +2,19 @@ @import "vendors/fontawesome/font-awesome.less"; @import "mixins.less"; -@import "variables.less"; -@import "fonts.less"; -@import "book/languages.less"; -@import "book/header.less"; -@import "book/summary.less"; -@import "book/font-settings.less"; -@import "book/body.less"; -@import "book/exercise.less"; -@import "book/quiz.less"; -@import "book/markdown.less"; -@import "book/progress.less"; -@import "book/navigation.less"; +@import "website/fonts.less"; +@import "website/variables.less"; +@import "website/languages.less"; +@import "website/header.less"; +@import "website/summary.less"; +@import "website/font-settings.less"; +@import "website/body.less"; +@import "website/exercise.less"; +@import "website/quiz.less"; +@import "website/markdown.less"; +@import "website/progress.less"; +@import "website/navigation.less"; * { -webkit-overflow-scrolling: touch; diff --git a/theme/stylesheets/book/body.less b/theme/stylesheets/website/body.less index 9c0340f..63cf8f1 100755 --- a/theme/stylesheets/book/body.less +++ b/theme/stylesheets/website/body.less @@ -37,7 +37,8 @@ background: @page-background; border-radius: 2px; - line-height: 1.5em; + line-height: @content-line-height; + font-size: @default-font-size; } .btn-group { diff --git a/theme/stylesheets/book/exercise.less b/theme/stylesheets/website/exercise.less index a6f8a45..a6f8a45 100755 --- a/theme/stylesheets/book/exercise.less +++ b/theme/stylesheets/website/exercise.less diff --git a/theme/stylesheets/book/font-settings.less b/theme/stylesheets/website/font-settings.less index 42fe41f..42fe41f 100644 --- a/theme/stylesheets/book/font-settings.less +++ b/theme/stylesheets/website/font-settings.less diff --git a/theme/stylesheets/fonts.less b/theme/stylesheets/website/fonts.less index 3dfff3f..e6457bc 100755..100644 --- a/theme/stylesheets/fonts.less +++ b/theme/stylesheets/website/fonts.less @@ -1,16 +1,4 @@ @font-face { - font-family: 'EB Garamond'; - font-style: normal; - font-weight: 400; - src: local('EB Garamond 12 Regular'),url('@{FontPath}/ebgaramond/400.woff') format('woff'); -} -@font-face { - font-family: 'EB Garamond'; - font-style: italic; - font-weight: 400i; - src: local('EB Garamond 12 Italic'),url('@{FontPath}/ebgaramond/400i.woff') format('woff'); -} -@font-face { font-family: 'Merriweather'; font-style: normal; font-weight: 250; @@ -19,7 +7,7 @@ @font-face { font-family: 'Merriweather'; font-style: italic; - font-weight: 250i; + font-weight: 250; src: local('Merriweather Light Italic'),url('@{FontPath}/merriweather/250i.woff') format('woff'); } @font-face { @@ -31,31 +19,19 @@ @font-face { font-family: 'Merriweather'; font-style: italic; - font-weight: 400i; + font-weight: 400; src: local('Merriweather Italic'),url('@{FontPath}/merriweather/400i.woff') format('woff'); } @font-face { font-family: 'Merriweather'; font-style: normal; - font-weight: 600; - src: local(''),url('@{FontPath}/merriweather/600.woff') format('woff'); -} -/*@font-face { - font-family: 'Merriweather'; - font-style: italic; - font-weight: 600i; - src: local(''),url('@{FontPath}/merriweather/600i.woff') format('woff'); -}*/ -@font-face { - font-family: 'Merriweather'; - font-style: normal; font-weight: 700; src: local('Merriweather Bold'),url('@{FontPath}/merriweather/700.woff') format('woff'); } @font-face { font-family: 'Merriweather'; font-style: italic; - font-weight: 700i; + font-weight: 700; src: local('Merriweather Bold Italic'),url('@{FontPath}/merriweather/700i.woff') format('woff'); } @font-face { @@ -67,34 +43,10 @@ @font-face { font-family: 'Merriweather'; font-style: italic; - font-weight: 900i; + font-weight: 900; src: local('Merriweather Heavy Italic'),url('@{FontPath}/merriweather/900i.woff') format('woff'); } @font-face { - font-family: 'Anonymous Pro'; - font-style: normal; - font-weight: 400; - src: local('Anonymous Pro'),url('@{FontPath}/anonymouspro/400.woff') format('woff'); -} -@font-face { - font-family: 'Anonymous Pro'; - font-style: italic; - font-weight: 400i; - src: local('Anonymous Pro Italic'),url('@{FontPath}/anonymouspro/400i.woff') format('woff'); -} -@font-face { - font-family: 'Anonymous Pro'; - font-style: normal; - font-weight: 700; - src: local('Anonymous Pro Bold'),url('@{FontPath}/anonymouspro/700.woff') format('woff'); -} -@font-face { - font-family: 'Anonymous Pro'; - font-style: italic; - font-weight: 700i; - src: local('Anonymous Pro Bold Italic'),url('@{FontPath}/anonymouspro/700i.woff') format('woff'); -} -@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300; @@ -103,7 +55,7 @@ @font-face { font-family: 'Open Sans'; font-style: italic; - font-weight: 300i; + font-weight: 300; src: local('Open Sans Light Italic'),url('@{FontPath}/opensans/300i.woff') format('woff'); } @font-face { @@ -115,7 +67,7 @@ @font-face { font-family: 'Open Sans'; font-style: italic; - font-weight: 400i; + font-weight: 400; src: local('Open Sans Italic'),url('@{FontPath}/opensans/400i.woff') format('woff'); } @font-face { @@ -127,7 +79,7 @@ @font-face { font-family: 'Open Sans'; font-style: italic; - font-weight: 600i; + font-weight: 600; src: local('Open Sans Semibold Italic'),url('@{FontPath}/opensans/600i.woff') format('woff'); } @font-face { @@ -139,6 +91,6 @@ @font-face { font-family: 'Open Sans'; font-style: italic; - font-weight: 700i; + font-weight: 700; src: local('Open Sans Bold Italic'),url('@{FontPath}/opensans/700i.woff') format('woff'); }
\ No newline at end of file diff --git a/theme/stylesheets/book/header.less b/theme/stylesheets/website/header.less index 2acaee4..39d49c3 100755 --- a/theme/stylesheets/book/header.less +++ b/theme/stylesheets/website/header.less @@ -13,7 +13,7 @@ font-size: 0.85em; color: @header-color; background: @header-background; - box-shadow: 0 1px 2px hsla(200,10%,80%,0.6); + border-bottom: 1px solid @header-border; .btn { display: block; @@ -44,12 +44,16 @@ padding-right: 200px; .transition(margin-left 0.5s ease); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + a, a:hover { color: inherit; text-decoration: none; } - @media (max-width: 800px) { + @media (max-width: 1000px) { display: none; } diff --git a/theme/stylesheets/book/highlight/night.less b/theme/stylesheets/website/highlight/night.less index 8e06c2a..8e06c2a 100644 --- a/theme/stylesheets/book/highlight/night.less +++ b/theme/stylesheets/website/highlight/night.less diff --git a/theme/stylesheets/book/highlight/sepia.less b/theme/stylesheets/website/highlight/sepia.less index 3d9dddb..3d9dddb 100644 --- a/theme/stylesheets/book/highlight/sepia.less +++ b/theme/stylesheets/website/highlight/sepia.less diff --git a/theme/stylesheets/book/highlight/white.less b/theme/stylesheets/website/highlight/white.less index ae9d1f8..ae9d1f8 100644 --- a/theme/stylesheets/book/highlight/white.less +++ b/theme/stylesheets/website/highlight/white.less diff --git a/theme/stylesheets/book/languages.less b/theme/stylesheets/website/languages.less index bde5a77..bde5a77 100755 --- a/theme/stylesheets/book/languages.less +++ b/theme/stylesheets/website/languages.less diff --git a/theme/stylesheets/book/markdown.less b/theme/stylesheets/website/markdown.less index 52927a8..52927a8 100755 --- a/theme/stylesheets/book/markdown.less +++ b/theme/stylesheets/website/markdown.less diff --git a/theme/stylesheets/book/navigation.less b/theme/stylesheets/website/navigation.less index 52270d1..e30bf7e 100755 --- a/theme/stylesheets/book/navigation.less +++ b/theme/stylesheets/website/navigation.less @@ -13,7 +13,7 @@ flex-direction: column; font-size: 40px; - color: rgba(0,0,0,0.4); + color: rgba(0, 0, 0, 0.2); text-align: center; @@ -21,7 +21,7 @@ &:hover { text-decoration: none; - color: rgba(0,0,0,0.6); + color: rgba(0, 0, 0, 0.6); } &.navigation-next { diff --git a/theme/stylesheets/book/progress.less b/theme/stylesheets/website/progress.less index c67d7e7..c67d7e7 100755 --- a/theme/stylesheets/book/progress.less +++ b/theme/stylesheets/website/progress.less diff --git a/theme/stylesheets/book/quiz.less b/theme/stylesheets/website/quiz.less index 0abdaf6..0abdaf6 100644 --- a/theme/stylesheets/book/quiz.less +++ b/theme/stylesheets/website/quiz.less diff --git a/theme/stylesheets/book/summary.less b/theme/stylesheets/website/summary.less index 49c7a29..13ebe05 100755 --- a/theme/stylesheets/book/summary.less +++ b/theme/stylesheets/website/summary.less @@ -11,7 +11,7 @@ width: @sidebar-width; color: @sidebar-color; background: @sidebar-background; - box-shadow: inset -1px 0 5px hsla(0, 0%, 0%, 0.1); + border-right: 1px solid @sidebar-border; .transition(all 0.5s ease); @@ -57,7 +57,6 @@ margin: 7px 0; overflow: hidden; background: @sidebar-divider-color; - box-shadow: 0 1px rgba(255,255,255,0.7); } i.fa-check { diff --git a/theme/stylesheets/variables.less b/theme/stylesheets/website/variables.less index ea18125..a4c75f6 100755..100644 --- a/theme/stylesheets/variables.less +++ b/theme/stylesheets/website/variables.less @@ -7,6 +7,7 @@ @header-height: 50px; @header-color: hsl(194, 5%, 52%); @header-background: white; +@header-border: rgba(0, 0, 0, 0.07); @header-button-color: hsl(194, 5%, 52%); @header-button-hover-color: #151515; @header-button-hover-background: hsl(207, 15%, 95%); @@ -18,28 +19,32 @@ @sidebar-width: 250px; @sidebar-breakpoint: 600px; @sidebar-color: hsl(207, 15%, 80%); -@sidebar-background: hsl(207, 15%, 95%); +@sidebar-background: @body-background; +@sidebar-border: @header-border; @sidebar-nested-padding: 20px; @sidebar-search-padding: 6px; @sidebar-search-background: transparent; -@sidebar-search-input-border-color: hsl(207, 15%, 80%); +@sidebar-search-input-border-color: @sidebar-border; -@sidebar-divider-color: hsl(207, 15%, 85%); +@sidebar-divider-color: @sidebar-border; -@sidebar-link-color: hsl(207, 15%, 50%); +@sidebar-link-color: hsl(207, 15%, 25%); @sidebar-link-background: transparent; @sidebar-link-hover-color: hsl(207, 100%, 50%); @sidebar-link-hover-background: transparent; @sidebar-icon-color: @bar-progress-background; -@sidebar-link-completed: hsl(207, 15%, 25%); +@sidebar-link-completed: @sidebar-link-color; @sidebar-link-completed-weight: normal; // Page -@page-color: black; -@page-background: white; +@page-color: black; +@page-background: @body-background; + +// Content +@content-line-height: 1.6em; // Progress Bar @chapter-display: none; @@ -76,19 +81,20 @@ @border-radius-small: 1px; // Fonts -@font-family-serif: Merriweather, "EB Garamond", Georgia, serif; +@font-family-serif: "Merriweather", Georgia, serif; @font-family-sans: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; -@font-family-base: @font-family-serif; - +@font-family-base: @font-family-sans; +@headings-font-family: inherit; @FontPath: '@{staticPath}/fonts'; @fa-font-path: "@{FontPath}/fontawesome"; -@s-font-size: 1.2rem; -@m-font-size: 1.4rem; -@l-font-size: 1.6rem; -@xl-font-size: 2.2rem; -@xxl-font-size: 4.0rem; +@s-font-size: 1.2rem; +@m-font-size: 1.4rem; +@l-font-size: 1.6rem; +@xl-font-size: 2.2rem; +@xxl-font-size: 4.0rem; +@default-font-size: @l-font-size; /* ,--------.,--. @@ -116,15 +122,15 @@ // Sidebar @sidebar-color-1: #AFA790; @sidebar-color-2: hsl(207, 15%, 80%); -@sidebar-background-1: #F3EACB; -@sidebar-background-2: #111111; +@sidebar-background-1: @body-background-1; +@sidebar-background-2: @body-background-2; @sidebar-search-background-1: transparent; @sidebar-search-background-2: transparent; @sidebar-search-input-border-color-1: #D6CFBA; -@sidebar-search-input-border-color-2: #c4cdd4; +@sidebar-search-input-border-color-2: #000; -@sidebar-divider-color-1: hsl(207, 15%, 85%); +@sidebar-divider-color-1: @sidebar-divider-color; @sidebar-divider-color-2: #1d1f21; @sidebar-link-color-1: #877F6A; @@ -138,14 +144,14 @@ @sidebar-icon-color-1: @bar-progress-background; @sidebar-icon-color-2: @bar-progress-background; -@sidebar-link-completed-1: hsl(207, 15%, 25%); -@sidebar-link-completed-2: hsl(207, 15%, 25%); +@sidebar-link-completed-1: @sidebar-link-color-1; +@sidebar-link-completed-2: @sidebar-link-color-2; @sidebar-link-completed-weight-1: normal; @sidebar-link-completed-weight-2: normal; // Page -@page-color-1: #704214; -@page-color-2: #a4b1b1; +@page-color-1: #704214; +@page-color-2: #a4b1b1; @page-background-1: #F3EACB; @page-background-2: #1d1f21; |