From 37c17846ad6b02c6dca72e8087a279cca04a0c27 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Sat, 20 Jan 2018 14:38:48 -0300 Subject: Fixed #28343 -- Add an OS chooser for docs command line examples. --- docs/_theme/djangodocs/layout.html | 19 + docs/_theme/djangodocs/static/console-tabs.css | 46 + .../djangodocs/static/fontawesome/LICENSE.txt | 34 + .../_theme/djangodocs/static/fontawesome/README.md | 7 + .../static/fontawesome/css/fa-brands.min.css | 5 + .../static/fontawesome/webfonts/fa-brands-400.eot | Bin 0 -> 97584 bytes .../static/fontawesome/webfonts/fa-brands-400.svg | 996 +++++++++++++++++++++ .../static/fontawesome/webfonts/fa-brands-400.ttf | Bin 0 -> 97348 bytes .../static/fontawesome/webfonts/fa-brands-400.woff | Bin 0 -> 63024 bytes .../fontawesome/webfonts/fa-brands-400.woff2 | Bin 0 -> 53928 bytes 10 files changed, 1107 insertions(+) create mode 100644 docs/_theme/djangodocs/static/console-tabs.css create mode 100644 docs/_theme/djangodocs/static/fontawesome/LICENSE.txt create mode 100644 docs/_theme/djangodocs/static/fontawesome/README.md create mode 100644 docs/_theme/djangodocs/static/fontawesome/css/fa-brands.min.css create mode 100644 docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.eot create mode 100644 docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.svg create mode 100644 docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.ttf create mode 100644 docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff create mode 100644 docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff2 (limited to 'docs/_theme') diff --git a/docs/_theme/djangodocs/layout.html b/docs/_theme/djangodocs/layout.html index f90030852c..acf83a47cd 100644 --- a/docs/_theme/djangodocs/layout.html +++ b/docs/_theme/djangodocs/layout.html @@ -53,8 +53,27 @@ }); }); })(jQuery); +{%- if include_console_assets -%} +(function($) { + $(document).ready(function() { + $(".c-tab-unix").on("click", function() { + $("section.c-content-unix").show(); + $("section.c-content-win").hide(); + $(".c-tab-unix").prop("checked", true); + }); + $(".c-tab-win").on("click", function() { + $("section.c-content-win").show(); + $("section.c-content-unix").hide(); + $(".c-tab-win").prop("checked", true); + }); + }); +})(jQuery); +{%- endif -%} {% endif %} +{%- if include_console_assets -%} + +{%- endif -%} {% endblock %} {% block document %} diff --git a/docs/_theme/djangodocs/static/console-tabs.css b/docs/_theme/djangodocs/static/console-tabs.css new file mode 100644 index 0000000000..c13ec7b1ac --- /dev/null +++ b/docs/_theme/djangodocs/static/console-tabs.css @@ -0,0 +1,46 @@ +@import url("{{ pathto('_static/fontawesome/css/fa-brands.min.css', 1) }}"); + +.console-block { + text-align: right; +} + +.console-block *:before, +.console-block *:after { + box-sizing: border-box; +} + +.console-block > section { + display: none; + text-align: left; +} + +.console-block > input.c-tab-unix, +.console-block > input.c-tab-win { + display: none; +} + +.console-block > label { + display: inline-block; + padding: 4px 8px; + font-weight: normal; + text-align: center; + color: #bbb; + border: 1px solid transparent; + font-family: fontawesome; +} + +.console-block > input:checked + label { + color: #555; + border: 1px solid #ddd; + border-top: 2px solid #ab5603; + border-bottom: 1px solid #fff; +} + +.console-block > .c-tab-unix:checked ~ .c-content-unix, +.console-block > .c-tab-win:checked ~ .c-content-win { + display: block; +} + +.console-block pre { + margin-top: 0px; +} diff --git a/docs/_theme/djangodocs/static/fontawesome/LICENSE.txt b/docs/_theme/djangodocs/static/fontawesome/LICENSE.txt new file mode 100644 index 0000000000..28c1c4bc73 --- /dev/null +++ b/docs/_theme/djangodocs/static/fontawesome/LICENSE.txt @@ -0,0 +1,34 @@ +Font Awesome Free License +------------------------- + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license. + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) +In the Font Awesome Free download, the CC BY 4.0 license applies to all icons +packaged as SVG and JS file types. + +# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) +In the Font Awesome Free download, the SIL OLF license applies to all icons +packaged as web and desktop font files. + +# Code: MIT License (https://opensource.org/licenses/MIT) +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +# Attribution +Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +# Brand Icons +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** diff --git a/docs/_theme/djangodocs/static/fontawesome/README.md b/docs/_theme/djangodocs/static/fontawesome/README.md new file mode 100644 index 0000000000..72a373e348 --- /dev/null +++ b/docs/_theme/djangodocs/static/fontawesome/README.md @@ -0,0 +1,7 @@ +# Font Awesome 5.0.4 + +Thanks for downloading Font Awesome! We're so excited you're here. + +Our documentation is available online. Just head here: + +https://fontawesome.com diff --git a/docs/_theme/djangodocs/static/fontawesome/css/fa-brands.min.css b/docs/_theme/djangodocs/static/fontawesome/css/fa-brands.min.css new file mode 100644 index 0000000000..244a01ef98 --- /dev/null +++ b/docs/_theme/djangodocs/static/fontawesome/css/fa-brands.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.4 by @fontawesome - http://fontawesome.com + * License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands} \ No newline at end of file diff --git a/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.eot b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.eot new file mode 100644 index 0000000000..45f12a121f Binary files /dev/null and b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.eot differ diff --git a/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.svg b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.svg new file mode 100644 index 0000000000..2f26609a1a --- /dev/null +++ b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.svg @@ -0,0 +1,996 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.ttf b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.ttf new file mode 100644 index 0000000000..ed62125e40 Binary files /dev/null and b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.ttf differ diff --git a/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff new file mode 100644 index 0000000000..dc90ab137a Binary files /dev/null and b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff differ diff --git a/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff2 b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff2 new file mode 100644 index 0000000000..d14f86eb86 Binary files /dev/null and b/docs/_theme/djangodocs/static/fontawesome/webfonts/fa-brands-400.woff2 differ -- cgit v1.3