diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2016-07-24 19:13:40 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2016-07-24 19:13:40 -0400 |
| commit | b1900d6ebcc39738885f90fa9f18b28206a74947 (patch) | |
| tree | 2d4975fe0a347af7101200c48e4a8df82ca780ae /mkdocs-material/src/assets/stylesheets/modules/article | |
| parent | 754ea372c66afad144988fcab2d7cf1fdbb3f2fc (diff) | |
very early checkin of template for user-docs, only a few pages filled out
Diffstat (limited to 'mkdocs-material/src/assets/stylesheets/modules/article')
4 files changed, 891 insertions, 0 deletions
diff --git a/mkdocs-material/src/assets/stylesheets/modules/article/_animation.scss b/mkdocs-material/src/assets/stylesheets/modules/article/_animation.scss new file mode 100644 index 00000000..4a3cfb10 --- /dev/null +++ b/mkdocs-material/src/assets/stylesheets/modules/article/_animation.scss @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/* ---------------------------------------------------------------------------- + * Article animation + * ------------------------------------------------------------------------- */ + +/* + * Fade color after highlighting + */ +pre span { + transition: color .25s; +} + +/* + * Copyright and theme information + */ +.copyright { + + /* + * Animate color on hover + */ + a { + transition: color .25s; + } +}
\ No newline at end of file diff --git a/mkdocs-material/src/assets/stylesheets/modules/article/_appearance.scss b/mkdocs-material/src/assets/stylesheets/modules/article/_appearance.scss new file mode 100644 index 00000000..f02f84e4 --- /dev/null +++ b/mkdocs-material/src/assets/stylesheets/modules/article/_appearance.scss @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/* ---------------------------------------------------------------------------- + * Article appearance + * ------------------------------------------------------------------------- */ + +/* + * Article + */ +.article { + + /* + * Differing top and bottom rubberband backgrounds in iOS web application + */ + .ios.standalone & { + background: linear-gradient( + to bottom, $white 50%, $primary 50%); + + /* Hack [iOS]: Mitigate black bounding box with linear gradient */ + .wrapper { + background: linear-gradient( + to bottom, $white 50%, $white 50%); + } + } + + /* + * Headlines, chapters, links and inline code + */ + h1, h2, a { + color: $primary; + } + + /* + * Inline code + */ + code { + background: #eee; + } + + /* + * Keyboard tags + */ + kbd { + color: #555; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; + } + + /* + * Lower border for main headline + */ + h1 { + border-bottom: 1px solid $black-lightest; + } + + /* + * Underline links + */ + a { + border-bottom: 1px dotted; + } + + /* + * Hovered and focused links + */ + a:hover, a:focus { + color: $accent; + } + + /* + * Light permalinks + */ + .headerlink { + color: $black-lighter; + border: none; + } + + /* + * Data tables + */ + table { + @include drop-shadow(1); + + border-radius: 3px; + + /* + * Table heading + */ + th { + background: mix($primary, $white, 75%); + color: $white; + } + + /* + * Table cell + */ + td { + border-top: 1px solid rgba($black, 0.05); + } + } + + /* + * Blockquote styles + */ + blockquote { + border-left: 2px solid $black-light; + color: $black-light; + } +} + +/* + * Article footer + */ +.footer { + background: $primary; + color: $white; + + /* + * Remove bottom border on links + */ + a { + border: none; + } +} + +/* + * Copyright and theme information + */ +.copyright { + color: $black-light; +} + +/* + * Pagination + */ +.pagination { + + /* + * Inherit color for links + */ + a .title, a .button { + color: $white; + } + + /* + * Smaller font size for direction + */ + .direction { + color: $white-light; + } +} + +/* + * Admonition support + */ +.admonition { + background: $light-blue-400; + color: $white; + + /* + * Embedded code blocks + */ + pre { + background: $white-lighter; + } + + /* + * A warning hint + */ + &.warning { + background: $red-400; + } + + /* + * Headlines, chapters, links and inline code + */ + a, a:hover { + color: $white; + } +}
\ No newline at end of file diff --git a/mkdocs-material/src/assets/stylesheets/modules/article/_layout.scss b/mkdocs-material/src/assets/stylesheets/modules/article/_layout.scss new file mode 100644 index 00000000..c5605160 --- /dev/null +++ b/mkdocs-material/src/assets/stylesheets/modules/article/_layout.scss @@ -0,0 +1,585 @@ +/* + * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/* ---------------------------------------------------------------------------- + * Article layout + * ------------------------------------------------------------------------- */ + +/* + * Article + */ +.article { + font-size: 14px; + line-height: 1.7em; + + /* [tablet landscape+]: Indent to account for drawer */ + @include break-from-device(tablet landscape) { + margin-left: 262px; + } + + /* + * Clearfix + */ + &:after { + content: " "; + display: block; + clear: both; + } + + /* + * Article wrapper + */ + .wrapper { + padding: 116px 16px 92px; + + /* [tablet portait+]: Increase top spacing */ + @include break-from-device(tablet portrait) { + padding: 128px 24px 96px; + } + } + + /* + * Enable overflow scrolling in iOS web application + */ + .ios.standalone & { + @include position(absolute, 56px 0 0 0); + + overflow: auto; + -webkit-overflow-scrolling: touch; + + /* [orientation: portrait]: Account for status bar in portrait mode */ + @include break-at-orientation(portrait) { + @include position(absolute, (56px + 20px) 0 0 0); + } + + /* + * Article wrapper + */ + .wrapper { + position: relative; + min-height: 100%; + padding-top: 60px; + margin-bottom: 2px; + } + } + + /* + * Article headline + */ + h1 { + font-size: 24px; + line-height: 1.333334em; + padding: 20px 0 42px; + } + + /* + * Article chapters + */ + h2 { + font-size: 20px; + line-height: 1.4em; + padding-top: (36px + 56px); + margin-top: (0px - 56px); + + /* + * No offset correction in iOS web application + */ + .ios.standalone & { + padding-top: 36px; + margin: 0; + } + } + + /* + * Sub headlines + */ + h3, h4 { + font-size: 14px; + padding-top: (20px + 56px); + margin-top: (0 - 56px); + + /* + * No offset correction in iOS web application + */ + .ios.standalone & { + padding-top: 20px; + margin-top: 0; + } + } + + /* + * Align permalinks on the right + */ + .headerlink { + float: right; + margin-left: 20px; + font-size: 14px; + + /* + * Hide permalink to main headline + */ + h1 & { + display: none; + } + } + + /* + * Paragraphs and section titles + */ + p, ul, ol { + margin-top: 1.5em; + } + + /* + * Smaler top spacing for nested lists + */ + li ul, li ol { + margin-top: 0.75em; + } + + /* + * List elements + */ + li { + margin-top: 0.75em; + margin-left: 18px; + + /* + * Inline paragraphs in list elements + */ + p { + display: inline; + } + } + + /* + * Add icon for elements of an unordered list + */ + ul > li:before { + content: "\e602"; + display: block; + float: left; + font-family: 'Icon'; + font-size: 16px; + width: 1.2em; + margin-left: -1.2em; + vertical-align: -0.1em; + } + + /* + * Inline code snippets must not wrap + */ + p > code { + white-space: nowrap; + padding: 2px 4px; + } + + /* + * Keyboard tags + */ + kbd { + display: inline-block; + padding: 3px 5px; + line-height: 10px; + } + + /* + * Add spacing at top of separator + */ + hr { + margin-top: 1.5em; + } + + /* + * Limit images to article container + */ + img { + max-width: 100%; + } + + /* + * Code listing container + */ + pre { + padding: 16px; + margin: 1.5em -16px 0; + line-height: 1.5em; + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + /* + * Data tables + */ + table { + margin: 3.0em 0 1.5em; + font-size: 13px; + overflow: hidden; + + /* + * The semi-cool solution, in case javascript is not available + */ + .no-js & { + display: inline-block; + max-width: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + /* + * Table heading + */ + th { + min-width: 100px; + padding: 12px 16px; + font-size: 12px; + text-align: left; + vertical-align: top; + } + + /* + * Table cell + */ + td { + padding: 12px 16px; + vertical-align: top; + } + } + + /* + * Blockquote styles + */ + blockquote { + padding-left: 16px; + } + + /* + * Data table wrapper, in case javascript is available + */ + .data { + margin: 1.5em -16px; + padding: 1.5em 0; + overflow: auto; + -webkit-overflow-scrolling: touch; + text-align: center; + + /* + * Data table + */ + table { + display: inline-block; + margin: 0 16px; + text-align: left; + } + + /* [tablet portait+]: Increase spacing */ + @include break-from-device(tablet portrait) { + margin: 1.5em -24px; + + /* + * Data table + */ + table { + margin: 0 24px; + } + } + } + + /* [tablet portait+]: Increase spacing */ + @include break-from-device(tablet portrait) { + + /* + * Account for larged header bar and anchors + */ + h2 { + padding-top: (28px + 72px); + margin-top: (8px - 72px); + + /* + * No offset correction in iOS web application + */ + .ios.standalone & { + padding-top: 28px; + margin-top: 8px; + } + } + + /* + * Sub headlines + */ + h3, h4 { + padding-top: (20px + 64px); + margin-top: (0 - 64px); + + /* + * No offset correction in iOS web application + */ + .ios.standalone & { + padding-top: 20px; + margin-top: 0; + } + } + + /* + * Increase spacing for code blocks + */ + pre { + padding: 1.5em 24px; + margin: 1.5em -24px 0; + } + } +} + +/* + * Article footer + */ +.footer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 0 4px; + + /* [tablet portait+]: Larger spacing */ + @include break-from-device(tablet portrait) { + padding: 0 8px; + } + + /* [tablet landscape+]: Stretch footer to viewport */ + @include break-from-device(tablet landscape) { + z-index: 5; + } +} + +/* + * Copyright and theme information + */ +.copyright { + margin: 1.5em 0; + + /* [tablet landscape+]: Add bottom spacing */ + @include break-from-device(tablet landscape) { + margin-bottom: 64px; + } +} + +/* + * Pagination + */ +.pagination { + max-width: 1184px; + height: 92px; + padding: 4px 0; + margin-left: auto; + margin-right: auto; + overflow: hidden; + + /* [tablet portait+]: Larger pagination and spacing */ + @include break-from-device(tablet portrait) { + height: 96px; + padding: 8px 0; + } + + /* + * Links should span icons entirely + */ + a { + display: block; + height: 100%; + } + + /* + * Previous and next page + */ + .previous, + .next { + position: relative; + float: left; + height: 100%; + } + + /* + * Previous page + */ + .previous { + width: 25%; + + /* + * Hide direction + */ + .direction { + display: none; + } + + /* + * Hide title + */ + .stretch { + display: none; + } + } + + /* + * Next page + */ + .next { + width: 75%; + text-align: right; + } + + /* + * Link to page + */ + .page { + display: table; + position: absolute; + bottom: 4px; + } + + /* + * Put direction over page title + */ + .direction { + display: block; + position: absolute; + bottom: 40px; + width: 100%; + font-size: 15px; + line-height: 20px; + padding: 0 52px; + } + + /* + * Decrease indent for stretching content + */ + .stretch { + padding: 0 4px; + + /* + * Correct vertical spacing + */ + .title { + font-size: 18px; + padding: 11px 0 13px; + } + } + + /* [mobile landscape+]: Proportional width for pagination */ + @include break-from-device(mobile landscape) { + + /* + * Previous and next page + */ + .previous, + .next { + width: 50%; + } + + /* + * Previous page + */ + .previous { + width: 50%; + + /* + * Show direction + */ + .direction { + display: block; + } + + /* + * Show title + */ + .stretch { + display: table; + } + } + } + + /* [tablet portrait+]: Increase vertical spacing */ + @include break-from-device(tablet portrait) { + + /* + * Increase vertical spacing + */ + .direction { + padding: 0 56px; + bottom: 40px; + } + + /* + * Increase vertical spacing + */ + .stretch { + padding: 0 8px; + } + } +} + +/* + * Admonition support + */ +.admonition { + margin: 20px -16px 0; + padding: 20px 16px; + + /* + * Remove redundant margin of first child + */ + > :first-child { + margin-top: 0; + } + + /* [tablet portait+]: Increase horizontal spacing */ + @include break-from-device(tablet portrait) { + margin: 20px -24px 0; + padding: 20px 24px; + } + + /* + * Admonition title, if given + */ + .admonition-title { + font-size: 20px; + + /* + * Default icon + */ + &:before { + content: "\e611"; + display: block; + float: left; + font-family: 'Icon'; + font-size: 24px; + vertical-align: -0.1em; + margin-right: 5px; + } + } + + /* + * Warning icon + */ + &.warning .admonition-title:before { + content: "\e610"; + } +}
\ No newline at end of file diff --git a/mkdocs-material/src/assets/stylesheets/modules/article/_typography.scss b/mkdocs-material/src/assets/stylesheets/modules/article/_typography.scss new file mode 100644 index 00000000..c657a7a2 --- /dev/null +++ b/mkdocs-material/src/assets/stylesheets/modules/article/_typography.scss @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/* ---------------------------------------------------------------------------- + * Article typography + * ------------------------------------------------------------------------- */ + +/* + * Article + */ +.article { + + /* + * Third-level headlines should be bold + */ + h3 { + font-weight: 700; + } + + /* + * Fourth-level headlines should be italic + */ + h4 { + font-weight: 400; + font-style: italic; + } +} + +/* + * Permalink support + */ +.article { + h2, h3, h4, h5, h6 { + a { + font-weight: 400; + font-style: normal; + } + } +}
\ No newline at end of file |
