From d646f5f72ae575a7221d2fb3c47703953357c3ed Mon Sep 17 00:00:00 2001 From: Dmitry Arkhipov Date: Fri, 29 Mar 2019 16:56:56 +0300 Subject: [PATCH] asciidoc docs rendering --- conanfile.py | 22 +- doc/assets/css/mixins.scss | 27 + doc/assets/css/path.scss | 15 + doc/assets/css/theme.scss | 900 ++++++++++++++++++++++++++++++++ doc/assets/css/variables.scss | 606 +++++++++++++++++++++ doc/assets/img/bullet.png | Bin 0 -> 1045 bytes doc/assets/img/hr.gif | Bin 0 -> 1121 bytes doc/assets/img/nav-bg.gif | Bin 0 -> 1238 bytes doc/build.jam | 98 ++++ doc/examples/example0.cpp | 12 + doc/include/head.html.erb | 28 + doc/include/header.html.erb | 15 + doc/include/main_title.html.erb | 26 + doc/index.adoc | 22 + doc/templates/document.html.erb | 54 ++ exports/build.jam | 54 +- exports/install-path.jam | 38 -- jamroot.jam | 26 +- 18 files changed, 1874 insertions(+), 69 deletions(-) create mode 100644 doc/assets/css/mixins.scss create mode 100644 doc/assets/css/path.scss create mode 100644 doc/assets/css/theme.scss create mode 100644 doc/assets/css/variables.scss create mode 100644 doc/assets/img/bullet.png create mode 100644 doc/assets/img/hr.gif create mode 100644 doc/assets/img/nav-bg.gif create mode 100644 doc/build.jam create mode 100644 doc/examples/example0.cpp create mode 100644 doc/include/head.html.erb create mode 100644 doc/include/header.html.erb create mode 100644 doc/include/main_title.html.erb create mode 100644 doc/index.adoc create mode 100644 doc/templates/document.html.erb delete mode 100644 exports/install-path.jam diff --git a/conanfile.py b/conanfile.py index e0c854085..ed7939e81 100644 --- a/conanfile.py +++ b/conanfile.py @@ -29,16 +29,34 @@ class EnumFlagsConan(b2.B2.Mixin, ConanFile): url = "https://github.com/grisumbras/enum-flags" homepage = url + options = {"with_docs": [False, True]} + default_options = {"with_docs": False} + exports_sources = ( "jamroot.jam", "*build.jam", - "exports/*.jam", "*.hpp", "*.cpp", "LICENSE*", + "*.adoc", + "*.scss", + "*.erb", + "*.png", + "*.gif", ) no_copy_source = True - build_requires = "boost_build/[>=1.68]@bincrafters/stable" + build_requires = ( + "boost_build/[>=1.68]@bincrafters/stable", + "b2-tools/[>=0.1]@grisumbras/testing", + ) + + def b2_setup_builder(self, builder): + if self.options.with_docs: + builder.options.with_docs = True + builder.using("asciidoctor") + builder.using("sass") + builder.properties.install_prefix = self.package_folder + return builder def package_info(self): self.info.header_only() diff --git a/doc/assets/css/mixins.scss b/doc/assets/css/mixins.scss new file mode 100644 index 000000000..6b7f16093 --- /dev/null +++ b/doc/assets/css/mixins.scss @@ -0,0 +1,27 @@ +// Mixins +// -------------------------- + +@mixin fa-icon() { + display: inline-block; + font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); // ensures no half-pixel rendering in firefox + +} + +@mixin fa-icon-rotate($degrees, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: rotate($degrees); + -ms-transform: rotate($degrees); + transform: rotate($degrees); +} + +@mixin fa-icon-flip($horiz, $vert, $rotation) { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + -webkit-transform: scale($horiz, $vert); + -ms-transform: scale($horiz, $vert); + transform: scale($horiz, $vert); +} diff --git a/doc/assets/css/path.scss b/doc/assets/css/path.scss new file mode 100644 index 000000000..bb457c23a --- /dev/null +++ b/doc/assets/css/path.scss @@ -0,0 +1,15 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); + src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), + url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), + url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), + url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), + url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); +// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/doc/assets/css/theme.scss b/doc/assets/css/theme.scss new file mode 100644 index 000000000..6c84160b3 --- /dev/null +++ b/doc/assets/css/theme.scss @@ -0,0 +1,900 @@ +$fa-font-path: "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts" !default; + +@import "variables"; +@import "mixins"; +@import "path"; + + +@mixin icon($icon-name) { + @include fa-icon ; + &:before { content: $icon-name; } +} + + +@mixin nav-link($icon) { + .icon { + @include icon($icon); + color: #e8e8e8; + &:hover { color: #e8e8e8; } + } + + .text { + width: 0; + display: inline-block; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + } +} + + +@mixin clearfix() { + &:after { + content:""; + display:table; + clear:both; + } +} + +/* normalize.css 2012-02-07T12:37 UTC - http://github.com/necolas/normalize.css */ +/* ============================================================================= + HTML5 display definitions + ========================================================================== */ +/* + * Corrects block display not defined in IE6/7/8/9 & FF3 + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +main, +summary { + display: block; +} + +/* + * Corrects inline-block display not defined in IE6/7/8/9 & FF3 + */ +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying 'audio' without controls + */ +audio:not([controls]) { + display: none; +} + +/* + * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4 + * Known issue: no IE6 support + */ +[hidden] { + display: none; +} + +/* ============================================================================= + Base + ========================================================================== */ +/* + * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units + * http://clagnut.com/blog/348/#c790 + * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom + * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ + */ +html { + font-size: 100%; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -ms-text-size-adjust: 100%; + /* 2 */ +} + +/* + * Addresses font-family inconsistency between 'textarea' and other form elements. + */ +html, +button, +input, +select, +textarea { + font-family: sans-serif; +} + +/* + * Addresses margins handled incorrectly in IE6/7 + */ +body { + margin: 0; +} + +/* ============================================================================= + Links + ========================================================================== */ +/* + * Addresses outline displayed oddly in Chrome + */ +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers + * people.opera.com/patrickl/experiments/keyboard/test + */ +a:hover, +a:active { + outline: 0; +} + +/* ============================================================================= + Typography + ========================================================================== */ +/* + * Addresses font sizes and margins set differently in IE6/7 + * Addresses font sizes within 'main' and 'article' in FF4+, Chrome, S5 + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.75em; + margin: 2.33em 0; +} + +/* + * Addresses styling not present in IE7/8/9, S5, Chrome + */ +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to 'bolder' in FF3+, S4/5, Chrome +*/ +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in S5, Chrome + */ +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE6/7/8/9 + */ +mark { + background: #ff0; + color: #000; +} + +/* + * Addresses margins set differently in IE6/7 + */ +p, +pre { + margin: 1em 0; +} + +/* + * Corrects font family set oddly in IE6, S4/5, Chrome + * en.wikipedia.org/wiki/User:Davidgothberg/Test59 + */ +pre, +code, +kbd, +samp { + font-family: WorkAroundWebKitAndMozilla, monospace; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * 1. Addresses CSS quotes not supported in IE6/7 + * 2. Addresses quote property not supported in S4 + */ +/* 1 */ +q { + quotes: none; +} + +/* 2 */ +q:before, +q:after { + content: ''; + content: none; +} + +small { + font-size: 75%; +} + +/* + * Prevents sub and sup affecting line-height in all browsers + * gist.github.com/413930 + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ============================================================================= + Lists + ========================================================================== */ +/* + * Addresses margins set differently in IE6/7 + */ +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +/* + * Addresses paddings set differently in IE6/7 + */ +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +/* + * Corrects list images handled incorrectly in IE7 + */ +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +/* ============================================================================= + Embedded content + ========================================================================== */ +/* + * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3 + * 2. Improves image quality when scaled in IE7 + * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ + */ +img { + border: 0; + /* 1 */ + -ms-interpolation-mode: bicubic; + /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE9 + */ +svg:not(:root) { + overflow: hidden; +} + +/* ============================================================================= + Figures + ========================================================================== */ +/* + * Addresses margin not present in IE6/7/8/9, S5, O11 + */ +figure { + margin: 0; +} + +/* ============================================================================= + Forms + ========================================================================== */ +/* + * Corrects margin displayed oddly in IE6/7 + */ +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE6/7/8/9 + * 2. Corrects text not wrapping in FF3 + * 3. Corrects alignment displayed oddly in IE6/7 + */ +legend { + border: 0; + /* 1 */ + padding: 0; + white-space: normal; + /* 2 */ + *margin-left: -7px; + /* 3 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers + * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome + * 3. Improves appearance and consistency in all browsers + */ +button, +input, +select, +textarea { + font-size: 100%; + /* 1 */ + margin: 0; + /* 2 */ + vertical-align: baseline; + /* 3 */ + *vertical-align: middle; + /* 3 */ +} + +/* + * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet + */ +button, +input { + line-height: normal; + /* 1 */ +} + +/* + * 1. Improves usability and consistency of cursor style between image-type 'input' and others + * 2. Corrects inability to style clickable 'input' types in iOS + * 3. Removes inner spacing in IE7 without affecting normal text inputs + * Known issue: inner spacing remains in IE6 + */ +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + /* 1 */ + -webkit-appearance: button; + /* 2 */ + *overflow: visible; + /* 3 */ +} + +/* + * Re-set default cursor for disabled elements + */ +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to content-box in IE8/9 + * 2. Removes excess padding in IE8/9 + * 3. Removes excess padding in IE7 + Known issue: excess padding remains in IE6 + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ + *height: 13px; + /* 3 */ + *width: 13px; + /* 3 */ +} + +/* + * 1. Addresses appearance set to searchfield in S5, Chrome + * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof) + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in S5, Chrome on OS X + */ +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in FF3+ + * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE6/7/8/9 + * 2. Improves readability and alignment in all browsers + */ +textarea { + overflow: auto; + /* 1 */ + vertical-align: top; + /* 2 */ +} + +/* ============================================================================= + Tables + ========================================================================== */ +/* + * Remove most spacing between table cells + */ +table { + border-collapse: collapse; + border-spacing: 0; +} + +body { + padding: 0px 0 20px 0px; + margin: 0px; + font: 14px/1.5 "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #f0e7d5; + font-weight: normal; + background: #252525; + background-attachment: fixed !important; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2a2a29), color-stop(100%, #1c1c1c)); + background: -webkit-linear-gradient(#2a2a29, #1c1c1c); + background: -moz-linear-gradient(#2a2a29, #1c1c1c); + background: -o-linear-gradient(#2a2a29, #1c1c1c); + background: -ms-linear-gradient(#2a2a29, #1c1c1c); + background: linear-gradient(#2a2a29, #1c1c1c); +} + +h1, h2, h3, h4, h5, h6 { + color: #e8e8e8; + margin: 0 0 10px; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: normal; +} + +p, ul, ol, table, pre, dl { + margin: 0 0 20px; +} + +h1, h2, h3 { + line-height: 1.1; +} + +h1 { + font-size: 28px; +} + +h2 { + font-size: 24px; +} + +h4, h5, h6 { + color: #e8e8e8; +} + +h3 { + font-size: 18px; + line-height: 24px; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif !important; + font-weight: normal; + color: #b6b6b6; +} + +a { + color: #ffcc00; + font-weight: 400; + text-decoration: none; +} +a:hover { + color: #ffeb9b; +} + +a small { + font-size: 11px; + color: #666; + margin-top: -0.6em; + display: block; +} + +ul { + list-style-image: url("../img/bullet.png"); +} + +strong { + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif !important; + font-weight: 700; +} + +.wrapper { + max-width: 650px; + margin: 0 auto; + position: relative; + padding: 0 20px; +} + +main img { + max-width: 100%; +} + +blockquote { + border-left: 3px solid #ffcc00; + margin: 0; + padding: 0 0 0 20px; + font-style: italic; +} + +code { + font-family: "Lucida Sans", Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, monospace; + color: darken(#efefef, 25); + font-size: 1.1em; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} + +pre, .toc { + padding: 8px 15px; + background: #191919; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; + border: 1px solid #121212; + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); + -o-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); + overflow: auto; + overflow-y: hidden; +} +pre code { + color: #efefef; + text-shadow: 0px 1px 0px #000; + margin: 0; + padding: 0; +} + +table { + width: 100%; + border-collapse: collapse; +} + +th { + text-align: left; + padding: 5px 10px; + border-bottom: 1px solid #434343; + color: #b6b6b6; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif !important; + font-weight: 600; +} + +td { + text-align: left; + padding: 5px 10px; + border-bottom: 1px solid #434343; +} + +hr { + border: 0; + outline: none; + height: 3px; + background: transparent url("../img/hr.gif") center center repeat-x; + margin: 0 0 20px; +} + +dt { + color: #F0E7D5; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif !important; + font-weight: 600; +} + +#header { + z-index: 100; + left: 0; + top: 0px; + height: 60px; + width: 100%; + position: fixed; + background: url(../img/nav-bg.gif) #353535; + border-bottom: 4px solid #434343; + -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25); + -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25); + -o-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25); + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25); + + nav { + max-width: 650px; + margin: 0 auto; + padding: 0 10px; + background: blue; + margin: 6px auto; + + ul, h3 { + margin: 0px; + padding: 0px; + display: inline; + } + + h3 { text-transform: uppercase; } + + .downloads { + float: right; + margin-left: 6px; + } + + .green-button { + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + list-style: none; + display: inline; + color: white; + line-height: 50px; + text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2); + font-size: 14px; + + a { + color: white; + border: 1px solid #5d910b; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #93bd20), color-stop(100%, #659e10)); + background: -webkit-linear-gradient(#93bd20, #659e10); + background: -moz-linear-gradient(#93bd20, #659e10); + background: -o-linear-gradient(#93bd20, #659e10); + background: -ms-linear-gradient(#93bd20, #659e10); + background: linear-gradient(#93bd20, #659e10); + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; + -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0px 3px 7px rgba(0, 0, 0, 0.7); + -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0px 3px 7px rgba(0, 0, 0, 0.7); + -o-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0px 3px 7px rgba(0, 0, 0, 0.7); + box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0px 3px 7px rgba(0, 0, 0, 0.7); + background-color: #93bd20; + padding: 10px 12px; + margin-top: 6px; + line-height: 14px; + font-size: 14px; + display: inline-block; + text-align: center; + + &:hover { + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #749619), color-stop(100%, #527f0e)); + background: -webkit-linear-gradient(#749619, #527f0e); + background: -moz-linear-gradient(#749619, #527f0e); + background: -o-linear-gradient(#749619, #527f0e); + background: -ms-linear-gradient(#749619, #527f0e); + background: linear-gradient(#749619, #527f0e); + background-color: #659e10; + border: 1px solid #527f0e; + -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px rgba(0, 0, 0, 0); + -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px rgba(0, 0, 0, 0); + -o-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px rgba(0, 0, 0, 0); + box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px rgba(0, 0, 0, 0); + } + } + + &.fork { + float: left; + margin-left: 0px; + } + + &.title { + float: right; + margin-right: 10px; + font-size: 11px; + } + } + } +} + +main { + max-width: 650px; + padding: 30px 0px 50px 0px; + margin: 20px 0; + margin-top: 70px; + + #title { + border: 0; + outline: none; + margin: 0 0 50px 0; + padding: 0 0 5px 0; + + h1 { + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + font-size: 40px; + text-align: center; + line-height: 36px; + } + + p { + color: #d7cfbe; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + font-size: 18px; + text-align: center; + } + + .credits { + font-size: 11px; + font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: normal; + color: #696969; + margin-top: -10px; + + &.left { float: left; } + + &.right { float: right; } + } + + #home-link-box { + @include clearfix; + + font-style: italic; + + p { + font-size: 1.2em; + float: left; + margin-bottom: 10px; + } + + .home-link { + @include nav-link($fa-var-home); + font-size: 1.2em; + + color: #e8e8e8; + &:hover { color: #e8e8e8; } + } + } + } +} + +article li { + h3 { + margin-bottom: 0; + } + + margin-bottom: 0.5em; +} + +.doc-nav { + @include clearfix; + + margin-top: 25px; + line-height: 1em; + + &.top { + margin-top: -60px; + margin-bottom: 30px; + } + + .next-page { + @include nav-link($fa-var-arrow-right); + font-size: 24px; + float: right; + } + + .prev-page { + @include nav-link($fa-var-arrow-left); + font-size: 24px; + float: left; + } +} + + +#main-content { + nav, section { + margin-bottom: 40px; + } + + .toc > ol { + list-style-type: arabic; + } + + section { + &:not(:last-child) { + border-bottom: 1px #434343 dashed; + } + } +} + + +@media print, screen and (max-width: 720px) { + #title .credits { + display: block; + width: 100%; + line-height: 30px; + text-align: center; + + .left, .right { + float: none; + display: block; + } + } +} + +@media print, screen and (max-width: 480px) { + #header { + margin-top: -20px; + + nav { display: none; } + } + + main { + margin-top: 40px; + } +} diff --git a/doc/assets/css/variables.scss b/doc/assets/css/variables.scss new file mode 100644 index 000000000..9b7210e23 --- /dev/null +++ b/doc/assets/css/variables.scss @@ -0,0 +1,606 @@ +// Variables +// -------------------------- + +$fa-font-path: "../fonts" !default; +$fa-font-size-base: 14px !default; +//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts" !default; // for referencing Bootstrap CDN font files directly +$fa-css-prefix: fa !default; +$fa-version: "4.3.0" !default; +$fa-border-color: #eee !default; +$fa-inverse: #fff !default; +$fa-li-width: (30em / 14) !default; + +$fa-var-adjust: "\f042"; +$fa-var-adn: "\f170"; +$fa-var-align-center: "\f037"; +$fa-var-align-justify: "\f039"; +$fa-var-align-left: "\f036"; +$fa-var-align-right: "\f038"; +$fa-var-ambulance: "\f0f9"; +$fa-var-anchor: "\f13d"; +$fa-var-android: "\f17b"; +$fa-var-angellist: "\f209"; +$fa-var-angle-double-down: "\f103"; +$fa-var-angle-double-left: "\f100"; +$fa-var-angle-double-right: "\f101"; +$fa-var-angle-double-up: "\f102"; +$fa-var-angle-down: "\f107"; +$fa-var-angle-left: "\f104"; +$fa-var-angle-right: "\f105"; +$fa-var-angle-up: "\f106"; +$fa-var-apple: "\f179"; +$fa-var-archive: "\f187"; +$fa-var-area-chart: "\f1fe"; +$fa-var-arrow-circle-down: "\f0ab"; +$fa-var-arrow-circle-left: "\f0a8"; +$fa-var-arrow-circle-o-down: "\f01a"; +$fa-var-arrow-circle-o-left: "\f190"; +$fa-var-arrow-circle-o-right: "\f18e"; +$fa-var-arrow-circle-o-up: "\f01b"; +$fa-var-arrow-circle-right: "\f0a9"; +$fa-var-arrow-circle-up: "\f0aa"; +$fa-var-arrow-down: "\f063"; +$fa-var-arrow-left: "\f060"; +$fa-var-arrow-right: "\f061"; +$fa-var-arrow-up: "\f062"; +$fa-var-arrows: "\f047"; +$fa-var-arrows-alt: "\f0b2"; +$fa-var-arrows-h: "\f07e"; +$fa-var-arrows-v: "\f07d"; +$fa-var-asterisk: "\f069"; +$fa-var-at: "\f1fa"; +$fa-var-automobile: "\f1b9"; +$fa-var-backward: "\f04a"; +$fa-var-ban: "\f05e"; +$fa-var-bank: "\f19c"; +$fa-var-bar-chart: "\f080"; +$fa-var-bar-chart-o: "\f080"; +$fa-var-barcode: "\f02a"; +$fa-var-bars: "\f0c9"; +$fa-var-bed: "\f236"; +$fa-var-beer: "\f0fc"; +$fa-var-behance: "\f1b4"; +$fa-var-behance-square: "\f1b5"; +$fa-var-bell: "\f0f3"; +$fa-var-bell-o: "\f0a2"; +$fa-var-bell-slash: "\f1f6"; +$fa-var-bell-slash-o: "\f1f7"; +$fa-var-bicycle: "\f206"; +$fa-var-binoculars: "\f1e5"; +$fa-var-birthday-cake: "\f1fd"; +$fa-var-bitbucket: "\f171"; +$fa-var-bitbucket-square: "\f172"; +$fa-var-bitcoin: "\f15a"; +$fa-var-bold: "\f032"; +$fa-var-bolt: "\f0e7"; +$fa-var-bomb: "\f1e2"; +$fa-var-book: "\f02d"; +$fa-var-bookmark: "\f02e"; +$fa-var-bookmark-o: "\f097"; +$fa-var-briefcase: "\f0b1"; +$fa-var-btc: "\f15a"; +$fa-var-bug: "\f188"; +$fa-var-building: "\f1ad"; +$fa-var-building-o: "\f0f7"; +$fa-var-bullhorn: "\f0a1"; +$fa-var-bullseye: "\f140"; +$fa-var-bus: "\f207"; +$fa-var-buysellads: "\f20d"; +$fa-var-cab: "\f1ba"; +$fa-var-calculator: "\f1ec"; +$fa-var-calendar: "\f073"; +$fa-var-calendar-o: "\f133"; +$fa-var-camera: "\f030"; +$fa-var-camera-retro: "\f083"; +$fa-var-car: "\f1b9"; +$fa-var-caret-down: "\f0d7"; +$fa-var-caret-left: "\f0d9"; +$fa-var-caret-right: "\f0da"; +$fa-var-caret-square-o-down: "\f150"; +$fa-var-caret-square-o-left: "\f191"; +$fa-var-caret-square-o-right: "\f152"; +$fa-var-caret-square-o-up: "\f151"; +$fa-var-caret-up: "\f0d8"; +$fa-var-cart-arrow-down: "\f218"; +$fa-var-cart-plus: "\f217"; +$fa-var-cc: "\f20a"; +$fa-var-cc-amex: "\f1f3"; +$fa-var-cc-discover: "\f1f2"; +$fa-var-cc-mastercard: "\f1f1"; +$fa-var-cc-paypal: "\f1f4"; +$fa-var-cc-stripe: "\f1f5"; +$fa-var-cc-visa: "\f1f0"; +$fa-var-certificate: "\f0a3"; +$fa-var-chain: "\f0c1"; +$fa-var-chain-broken: "\f127"; +$fa-var-check: "\f00c"; +$fa-var-check-circle: "\f058"; +$fa-var-check-circle-o: "\f05d"; +$fa-var-check-square: "\f14a"; +$fa-var-check-square-o: "\f046"; +$fa-var-chevron-circle-down: "\f13a"; +$fa-var-chevron-circle-left: "\f137"; +$fa-var-chevron-circle-right: "\f138"; +$fa-var-chevron-circle-up: "\f139"; +$fa-var-chevron-down: "\f078"; +$fa-var-chevron-left: "\f053"; +$fa-var-chevron-right: "\f054"; +$fa-var-chevron-up: "\f077"; +$fa-var-child: "\f1ae"; +$fa-var-circle: "\f111"; +$fa-var-circle-o: "\f10c"; +$fa-var-circle-o-notch: "\f1ce"; +$fa-var-circle-thin: "\f1db"; +$fa-var-clipboard: "\f0ea"; +$fa-var-clock-o: "\f017"; +$fa-var-close: "\f00d"; +$fa-var-cloud: "\f0c2"; +$fa-var-cloud-download: "\f0ed"; +$fa-var-cloud-upload: "\f0ee"; +$fa-var-cny: "\f157"; +$fa-var-code: "\f121"; +$fa-var-code-fork: "\f126"; +$fa-var-codepen: "\f1cb"; +$fa-var-coffee: "\f0f4"; +$fa-var-cog: "\f013"; +$fa-var-cogs: "\f085"; +$fa-var-columns: "\f0db"; +$fa-var-comment: "\f075"; +$fa-var-comment-o: "\f0e5"; +$fa-var-comments: "\f086"; +$fa-var-comments-o: "\f0e6"; +$fa-var-compass: "\f14e"; +$fa-var-compress: "\f066"; +$fa-var-connectdevelop: "\f20e"; +$fa-var-copy: "\f0c5"; +$fa-var-copyright: "\f1f9"; +$fa-var-credit-card: "\f09d"; +$fa-var-crop: "\f125"; +$fa-var-crosshairs: "\f05b"; +$fa-var-css3: "\f13c"; +$fa-var-cube: "\f1b2"; +$fa-var-cubes: "\f1b3"; +$fa-var-cut: "\f0c4"; +$fa-var-cutlery: "\f0f5"; +$fa-var-dashboard: "\f0e4"; +$fa-var-dashcube: "\f210"; +$fa-var-database: "\f1c0"; +$fa-var-dedent: "\f03b"; +$fa-var-delicious: "\f1a5"; +$fa-var-desktop: "\f108"; +$fa-var-deviantart: "\f1bd"; +$fa-var-diamond: "\f219"; +$fa-var-digg: "\f1a6"; +$fa-var-dollar: "\f155"; +$fa-var-dot-circle-o: "\f192"; +$fa-var-download: "\f019"; +$fa-var-dribbble: "\f17d"; +$fa-var-dropbox: "\f16b"; +$fa-var-drupal: "\f1a9"; +$fa-var-edit: "\f044"; +$fa-var-eject: "\f052"; +$fa-var-ellipsis-h: "\f141"; +$fa-var-ellipsis-v: "\f142"; +$fa-var-empire: "\f1d1"; +$fa-var-envelope: "\f0e0"; +$fa-var-envelope-o: "\f003"; +$fa-var-envelope-square: "\f199"; +$fa-var-eraser: "\f12d"; +$fa-var-eur: "\f153"; +$fa-var-euro: "\f153"; +$fa-var-exchange: "\f0ec"; +$fa-var-exclamation: "\f12a"; +$fa-var-exclamation-circle: "\f06a"; +$fa-var-exclamation-triangle: "\f071"; +$fa-var-expand: "\f065"; +$fa-var-external-link: "\f08e"; +$fa-var-external-link-square: "\f14c"; +$fa-var-eye: "\f06e"; +$fa-var-eye-slash: "\f070"; +$fa-var-eyedropper: "\f1fb"; +$fa-var-facebook: "\f09a"; +$fa-var-facebook-f: "\f09a"; +$fa-var-facebook-official: "\f230"; +$fa-var-facebook-square: "\f082"; +$fa-var-fast-backward: "\f049"; +$fa-var-fast-forward: "\f050"; +$fa-var-fax: "\f1ac"; +$fa-var-female: "\f182"; +$fa-var-fighter-jet: "\f0fb"; +$fa-var-file: "\f15b"; +$fa-var-file-archive-o: "\f1c6"; +$fa-var-file-audio-o: "\f1c7"; +$fa-var-file-code-o: "\f1c9"; +$fa-var-file-excel-o: "\f1c3"; +$fa-var-file-image-o: "\f1c5"; +$fa-var-file-movie-o: "\f1c8"; +$fa-var-file-o: "\f016"; +$fa-var-file-pdf-o: "\f1c1"; +$fa-var-file-photo-o: "\f1c5"; +$fa-var-file-picture-o: "\f1c5"; +$fa-var-file-powerpoint-o: "\f1c4"; +$fa-var-file-sound-o: "\f1c7"; +$fa-var-file-text: "\f15c"; +$fa-var-file-text-o: "\f0f6"; +$fa-var-file-video-o: "\f1c8"; +$fa-var-file-word-o: "\f1c2"; +$fa-var-file-zip-o: "\f1c6"; +$fa-var-files-o: "\f0c5"; +$fa-var-film: "\f008"; +$fa-var-filter: "\f0b0"; +$fa-var-fire: "\f06d"; +$fa-var-fire-extinguisher: "\f134"; +$fa-var-flag: "\f024"; +$fa-var-flag-checkered: "\f11e"; +$fa-var-flag-o: "\f11d"; +$fa-var-flash: "\f0e7"; +$fa-var-flask: "\f0c3"; +$fa-var-flickr: "\f16e"; +$fa-var-floppy-o: "\f0c7"; +$fa-var-folder: "\f07b"; +$fa-var-folder-o: "\f114"; +$fa-var-folder-open: "\f07c"; +$fa-var-folder-open-o: "\f115"; +$fa-var-font: "\f031"; +$fa-var-forumbee: "\f211"; +$fa-var-forward: "\f04e"; +$fa-var-foursquare: "\f180"; +$fa-var-frown-o: "\f119"; +$fa-var-futbol-o: "\f1e3"; +$fa-var-gamepad: "\f11b"; +$fa-var-gavel: "\f0e3"; +$fa-var-gbp: "\f154"; +$fa-var-ge: "\f1d1"; +$fa-var-gear: "\f013"; +$fa-var-gears: "\f085"; +$fa-var-genderless: "\f1db"; +$fa-var-gift: "\f06b"; +$fa-var-git: "\f1d3"; +$fa-var-git-square: "\f1d2"; +$fa-var-github: "\f09b"; +$fa-var-github-alt: "\f113"; +$fa-var-github-square: "\f092"; +$fa-var-gittip: "\f184"; +$fa-var-glass: "\f000"; +$fa-var-globe: "\f0ac"; +$fa-var-google: "\f1a0"; +$fa-var-google-plus: "\f0d5"; +$fa-var-google-plus-square: "\f0d4"; +$fa-var-google-wallet: "\f1ee"; +$fa-var-graduation-cap: "\f19d"; +$fa-var-gratipay: "\f184"; +$fa-var-group: "\f0c0"; +$fa-var-h-square: "\f0fd"; +$fa-var-hacker-news: "\f1d4"; +$fa-var-hand-o-down: "\f0a7"; +$fa-var-hand-o-left: "\f0a5"; +$fa-var-hand-o-right: "\f0a4"; +$fa-var-hand-o-up: "\f0a6"; +$fa-var-hdd-o: "\f0a0"; +$fa-var-header: "\f1dc"; +$fa-var-headphones: "\f025"; +$fa-var-heart: "\f004"; +$fa-var-heart-o: "\f08a"; +$fa-var-heartbeat: "\f21e"; +$fa-var-history: "\f1da"; +$fa-var-home: "\f015"; +$fa-var-hospital-o: "\f0f8"; +$fa-var-hotel: "\f236"; +$fa-var-html5: "\f13b"; +$fa-var-ils: "\f20b"; +$fa-var-image: "\f03e"; +$fa-var-inbox: "\f01c"; +$fa-var-indent: "\f03c"; +$fa-var-info: "\f129"; +$fa-var-info-circle: "\f05a"; +$fa-var-inr: "\f156"; +$fa-var-instagram: "\f16d"; +$fa-var-institution: "\f19c"; +$fa-var-ioxhost: "\f208"; +$fa-var-italic: "\f033"; +$fa-var-joomla: "\f1aa"; +$fa-var-jpy: "\f157"; +$fa-var-jsfiddle: "\f1cc"; +$fa-var-key: "\f084"; +$fa-var-keyboard-o: "\f11c"; +$fa-var-krw: "\f159"; +$fa-var-language: "\f1ab"; +$fa-var-laptop: "\f109"; +$fa-var-lastfm: "\f202"; +$fa-var-lastfm-square: "\f203"; +$fa-var-leaf: "\f06c"; +$fa-var-leanpub: "\f212"; +$fa-var-legal: "\f0e3"; +$fa-var-lemon-o: "\f094"; +$fa-var-level-down: "\f149"; +$fa-var-level-up: "\f148"; +$fa-var-life-bouy: "\f1cd"; +$fa-var-life-buoy: "\f1cd"; +$fa-var-life-ring: "\f1cd"; +$fa-var-life-saver: "\f1cd"; +$fa-var-lightbulb-o: "\f0eb"; +$fa-var-line-chart: "\f201"; +$fa-var-link: "\f0c1"; +$fa-var-linkedin: "\f0e1"; +$fa-var-linkedin-square: "\f08c"; +$fa-var-linux: "\f17c"; +$fa-var-list: "\f03a"; +$fa-var-list-alt: "\f022"; +$fa-var-list-ol: "\f0cb"; +$fa-var-list-ul: "\f0ca"; +$fa-var-location-arrow: "\f124"; +$fa-var-lock: "\f023"; +$fa-var-long-arrow-down: "\f175"; +$fa-var-long-arrow-left: "\f177"; +$fa-var-long-arrow-right: "\f178"; +$fa-var-long-arrow-up: "\f176"; +$fa-var-magic: "\f0d0"; +$fa-var-magnet: "\f076"; +$fa-var-mail-forward: "\f064"; +$fa-var-mail-reply: "\f112"; +$fa-var-mail-reply-all: "\f122"; +$fa-var-male: "\f183"; +$fa-var-map-marker: "\f041"; +$fa-var-mars: "\f222"; +$fa-var-mars-double: "\f227"; +$fa-var-mars-stroke: "\f229"; +$fa-var-mars-stroke-h: "\f22b"; +$fa-var-mars-stroke-v: "\f22a"; +$fa-var-maxcdn: "\f136"; +$fa-var-meanpath: "\f20c"; +$fa-var-medium: "\f23a"; +$fa-var-medkit: "\f0fa"; +$fa-var-meh-o: "\f11a"; +$fa-var-mercury: "\f223"; +$fa-var-microphone: "\f130"; +$fa-var-microphone-slash: "\f131"; +$fa-var-minus: "\f068"; +$fa-var-minus-circle: "\f056"; +$fa-var-minus-square: "\f146"; +$fa-var-minus-square-o: "\f147"; +$fa-var-mobile: "\f10b"; +$fa-var-mobile-phone: "\f10b"; +$fa-var-money: "\f0d6"; +$fa-var-moon-o: "\f186"; +$fa-var-mortar-board: "\f19d"; +$fa-var-motorcycle: "\f21c"; +$fa-var-music: "\f001"; +$fa-var-navicon: "\f0c9"; +$fa-var-neuter: "\f22c"; +$fa-var-newspaper-o: "\f1ea"; +$fa-var-openid: "\f19b"; +$fa-var-outdent: "\f03b"; +$fa-var-pagelines: "\f18c"; +$fa-var-paint-brush: "\f1fc"; +$fa-var-paper-plane: "\f1d8"; +$fa-var-paper-plane-o: "\f1d9"; +$fa-var-paperclip: "\f0c6"; +$fa-var-paragraph: "\f1dd"; +$fa-var-paste: "\f0ea"; +$fa-var-pause: "\f04c"; +$fa-var-paw: "\f1b0"; +$fa-var-paypal: "\f1ed"; +$fa-var-pencil: "\f040"; +$fa-var-pencil-square: "\f14b"; +$fa-var-pencil-square-o: "\f044"; +$fa-var-phone: "\f095"; +$fa-var-phone-square: "\f098"; +$fa-var-photo: "\f03e"; +$fa-var-picture-o: "\f03e"; +$fa-var-pie-chart: "\f200"; +$fa-var-pied-piper: "\f1a7"; +$fa-var-pied-piper-alt: "\f1a8"; +$fa-var-pinterest: "\f0d2"; +$fa-var-pinterest-p: "\f231"; +$fa-var-pinterest-square: "\f0d3"; +$fa-var-plane: "\f072"; +$fa-var-play: "\f04b"; +$fa-var-play-circle: "\f144"; +$fa-var-play-circle-o: "\f01d"; +$fa-var-plug: "\f1e6"; +$fa-var-plus: "\f067"; +$fa-var-plus-circle: "\f055"; +$fa-var-plus-square: "\f0fe"; +$fa-var-plus-square-o: "\f196"; +$fa-var-power-off: "\f011"; +$fa-var-print: "\f02f"; +$fa-var-puzzle-piece: "\f12e"; +$fa-var-qq: "\f1d6"; +$fa-var-qrcode: "\f029"; +$fa-var-question: "\f128"; +$fa-var-question-circle: "\f059"; +$fa-var-quote-left: "\f10d"; +$fa-var-quote-right: "\f10e"; +$fa-var-ra: "\f1d0"; +$fa-var-random: "\f074"; +$fa-var-rebel: "\f1d0"; +$fa-var-recycle: "\f1b8"; +$fa-var-reddit: "\f1a1"; +$fa-var-reddit-square: "\f1a2"; +$fa-var-refresh: "\f021"; +$fa-var-remove: "\f00d"; +$fa-var-renren: "\f18b"; +$fa-var-reorder: "\f0c9"; +$fa-var-repeat: "\f01e"; +$fa-var-reply: "\f112"; +$fa-var-reply-all: "\f122"; +$fa-var-retweet: "\f079"; +$fa-var-rmb: "\f157"; +$fa-var-road: "\f018"; +$fa-var-rocket: "\f135"; +$fa-var-rotate-left: "\f0e2"; +$fa-var-rotate-right: "\f01e"; +$fa-var-rouble: "\f158"; +$fa-var-rss: "\f09e"; +$fa-var-rss-square: "\f143"; +$fa-var-rub: "\f158"; +$fa-var-ruble: "\f158"; +$fa-var-rupee: "\f156"; +$fa-var-save: "\f0c7"; +$fa-var-scissors: "\f0c4"; +$fa-var-search: "\f002"; +$fa-var-search-minus: "\f010"; +$fa-var-search-plus: "\f00e"; +$fa-var-sellsy: "\f213"; +$fa-var-send: "\f1d8"; +$fa-var-send-o: "\f1d9"; +$fa-var-server: "\f233"; +$fa-var-share: "\f064"; +$fa-var-share-alt: "\f1e0"; +$fa-var-share-alt-square: "\f1e1"; +$fa-var-share-square: "\f14d"; +$fa-var-share-square-o: "\f045"; +$fa-var-shekel: "\f20b"; +$fa-var-sheqel: "\f20b"; +$fa-var-shield: "\f132"; +$fa-var-ship: "\f21a"; +$fa-var-shirtsinbulk: "\f214"; +$fa-var-shopping-cart: "\f07a"; +$fa-var-sign-in: "\f090"; +$fa-var-sign-out: "\f08b"; +$fa-var-signal: "\f012"; +$fa-var-simplybuilt: "\f215"; +$fa-var-sitemap: "\f0e8"; +$fa-var-skyatlas: "\f216"; +$fa-var-skype: "\f17e"; +$fa-var-slack: "\f198"; +$fa-var-sliders: "\f1de"; +$fa-var-slideshare: "\f1e7"; +$fa-var-smile-o: "\f118"; +$fa-var-soccer-ball-o: "\f1e3"; +$fa-var-sort: "\f0dc"; +$fa-var-sort-alpha-asc: "\f15d"; +$fa-var-sort-alpha-desc: "\f15e"; +$fa-var-sort-amount-asc: "\f160"; +$fa-var-sort-amount-desc: "\f161"; +$fa-var-sort-asc: "\f0de"; +$fa-var-sort-desc: "\f0dd"; +$fa-var-sort-down: "\f0dd"; +$fa-var-sort-numeric-asc: "\f162"; +$fa-var-sort-numeric-desc: "\f163"; +$fa-var-sort-up: "\f0de"; +$fa-var-soundcloud: "\f1be"; +$fa-var-space-shuttle: "\f197"; +$fa-var-spinner: "\f110"; +$fa-var-spoon: "\f1b1"; +$fa-var-spotify: "\f1bc"; +$fa-var-square: "\f0c8"; +$fa-var-square-o: "\f096"; +$fa-var-stack-exchange: "\f18d"; +$fa-var-stack-overflow: "\f16c"; +$fa-var-star: "\f005"; +$fa-var-star-half: "\f089"; +$fa-var-star-half-empty: "\f123"; +$fa-var-star-half-full: "\f123"; +$fa-var-star-half-o: "\f123"; +$fa-var-star-o: "\f006"; +$fa-var-steam: "\f1b6"; +$fa-var-steam-square: "\f1b7"; +$fa-var-step-backward: "\f048"; +$fa-var-step-forward: "\f051"; +$fa-var-stethoscope: "\f0f1"; +$fa-var-stop: "\f04d"; +$fa-var-street-view: "\f21d"; +$fa-var-strikethrough: "\f0cc"; +$fa-var-stumbleupon: "\f1a4"; +$fa-var-stumbleupon-circle: "\f1a3"; +$fa-var-subscript: "\f12c"; +$fa-var-subway: "\f239"; +$fa-var-suitcase: "\f0f2"; +$fa-var-sun-o: "\f185"; +$fa-var-superscript: "\f12b"; +$fa-var-support: "\f1cd"; +$fa-var-table: "\f0ce"; +$fa-var-tablet: "\f10a"; +$fa-var-tachometer: "\f0e4"; +$fa-var-tag: "\f02b"; +$fa-var-tags: "\f02c"; +$fa-var-tasks: "\f0ae"; +$fa-var-taxi: "\f1ba"; +$fa-var-tencent-weibo: "\f1d5"; +$fa-var-terminal: "\f120"; +$fa-var-text-height: "\f034"; +$fa-var-text-width: "\f035"; +$fa-var-th: "\f00a"; +$fa-var-th-large: "\f009"; +$fa-var-th-list: "\f00b"; +$fa-var-thumb-tack: "\f08d"; +$fa-var-thumbs-down: "\f165"; +$fa-var-thumbs-o-down: "\f088"; +$fa-var-thumbs-o-up: "\f087"; +$fa-var-thumbs-up: "\f164"; +$fa-var-ticket: "\f145"; +$fa-var-times: "\f00d"; +$fa-var-times-circle: "\f057"; +$fa-var-times-circle-o: "\f05c"; +$fa-var-tint: "\f043"; +$fa-var-toggle-down: "\f150"; +$fa-var-toggle-left: "\f191"; +$fa-var-toggle-off: "\f204"; +$fa-var-toggle-on: "\f205"; +$fa-var-toggle-right: "\f152"; +$fa-var-toggle-up: "\f151"; +$fa-var-train: "\f238"; +$fa-var-transgender: "\f224"; +$fa-var-transgender-alt: "\f225"; +$fa-var-trash: "\f1f8"; +$fa-var-trash-o: "\f014"; +$fa-var-tree: "\f1bb"; +$fa-var-trello: "\f181"; +$fa-var-trophy: "\f091"; +$fa-var-truck: "\f0d1"; +$fa-var-try: "\f195"; +$fa-var-tty: "\f1e4"; +$fa-var-tumblr: "\f173"; +$fa-var-tumblr-square: "\f174"; +$fa-var-turkish-lira: "\f195"; +$fa-var-twitch: "\f1e8"; +$fa-var-twitter: "\f099"; +$fa-var-twitter-square: "\f081"; +$fa-var-umbrella: "\f0e9"; +$fa-var-underline: "\f0cd"; +$fa-var-undo: "\f0e2"; +$fa-var-university: "\f19c"; +$fa-var-unlink: "\f127"; +$fa-var-unlock: "\f09c"; +$fa-var-unlock-alt: "\f13e"; +$fa-var-unsorted: "\f0dc"; +$fa-var-upload: "\f093"; +$fa-var-usd: "\f155"; +$fa-var-user: "\f007"; +$fa-var-user-md: "\f0f0"; +$fa-var-user-plus: "\f234"; +$fa-var-user-secret: "\f21b"; +$fa-var-user-times: "\f235"; +$fa-var-users: "\f0c0"; +$fa-var-venus: "\f221"; +$fa-var-venus-double: "\f226"; +$fa-var-venus-mars: "\f228"; +$fa-var-viacoin: "\f237"; +$fa-var-video-camera: "\f03d"; +$fa-var-vimeo-square: "\f194"; +$fa-var-vine: "\f1ca"; +$fa-var-vk: "\f189"; +$fa-var-volume-down: "\f027"; +$fa-var-volume-off: "\f026"; +$fa-var-volume-up: "\f028"; +$fa-var-warning: "\f071"; +$fa-var-wechat: "\f1d7"; +$fa-var-weibo: "\f18a"; +$fa-var-weixin: "\f1d7"; +$fa-var-whatsapp: "\f232"; +$fa-var-wheelchair: "\f193"; +$fa-var-wifi: "\f1eb"; +$fa-var-windows: "\f17a"; +$fa-var-won: "\f159"; +$fa-var-wordpress: "\f19a"; +$fa-var-wrench: "\f0ad"; +$fa-var-xing: "\f168"; +$fa-var-xing-square: "\f169"; +$fa-var-yahoo: "\f19e"; +$fa-var-yelp: "\f1e9"; +$fa-var-yen: "\f157"; +$fa-var-youtube: "\f167"; +$fa-var-youtube-play: "\f16a"; +$fa-var-youtube-square: "\f166"; + diff --git a/doc/assets/img/bullet.png b/doc/assets/img/bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..22ea54375ac8492b3c51cf6da0bfba787030e6d9 GIT binary patch literal 1045 zcmaJ=O-K}B7@ibMElse)x>0N3oSw5?98V->HIYF>5iUK zA`Lu5bm#{vC?X;w=x7lgyL9T*sXTTmFGV2OH|y@!L7T&T@AvXP&-=VT-;Kifxt{J| zH$f0R`J7b5r*C(49>o8{Pv7?AV*q8#Xu_I8HN}BMO0y~uVDSuTK#Y?R@n{4n4cmZ4dWW)fkR5n>5}VL{^~aW+Sr5{lATBNx7jWECM>py^tzM%5ye zkkmXh_8)PP86bocU)lJ`1N64~}H(jKdD$GkFi8&};*Mu=C6N$&UXgrpPv22!2 zrMWC0iDfx95#duQsfm>=b0v`+8^ydqi(wJ{`h8Vaq*?K`q0Gt?%>6K|7Cp}KZ=#S zlqz|jE8f;-HrN>f2WBg4$)%0t#jaI36bgN8`@Nj}IiRsO(?g)Qee+lH&GBcsu2Wkl zFCBT&_xy3&YHDb`?e40)*7fb$>q7tSN4El%;X-14`Lx|}Z~o~0K!1sNa^}RTSBEYK xuLp8pMev~G*qx4^U<$GJkL{hEhf4vXZ<2_8$_Xo1dk6i8n$M0)FVmCDe*jLcM%4fS literal 0 HcmV?d00001 diff --git a/doc/assets/img/hr.gif b/doc/assets/img/hr.gif new file mode 100644 index 0000000000000000000000000000000000000000..bdb4168de55a60c4d84ea1f5cb2dcbea7009c746 GIT binary patch literal 1121 zcmZ?wbhEHbWMyDxSj51fqO1Z0sw%3Aii)bLs?N^N3}B%6pF6@gK*1%kBoRp4*jE%J zCTFLXC?ut(XXe=|z2CiGNg*@ERw>-n*TA>HIW;5GqpB!1xXLdixhgx^GDXSWPQj+a zsv@@_H?<^Dp&~aYuh^=>Rw*$hKPlA;$OZ}PD=C1Llw{i~If5hKW)J z8<-g?n3?DqniyD`Sn4Pk85kPq8ye{wnCluESecqz85k-+ffCTRqLehNAQv~NT|l0# zQbtKhft9{~d3m{Bxv^e;QM$gNrKP35fswwEkuFe$ZgFK^Nn(X=Ua>OF1ees}+TSP$$Sz2y8{{ffi_eM3D1ke6TzeSPsO&CP|Y zE-nd5MYtEM!Nnn!1*!T$sm1xFMaii^<;ozd3ap%qQWHz^i$e1Ab6}wukda@KU!0L& zpx_*As%NO+o0y!L2ND76@b$Iw%quQQ%u7!7bg@+enxU7OnPO#O;%w<+?&@e}YU*le z=xXTbWaMgTZ0c%cXl`uj=;#8|>yn>bnwy$e0@Is<(CdU#FDNnO765H_NiE7OOHFYr z%Fk5*d)g`!w_7Z5ng`XJg4->YIQ8lS9itD5TBN9k2?5g&hzU=)Kn^_Vr{)3Edl4{U zGyebg_s{QNKYx7x_Vvr>Pai+LfA{vy>sK#dJb(7|$>T>4AKbrp_s;EGH*Z|OcJ<2T zOBXMkKX>-b=~E|996xsS$l*f=5A5H!chBx!J9li~wsp(qO&d3?U$=J6>QyUOEMK;C z$>K!|7tEhGch2ltGiOYnHg(G6NfRgZ_x1L4cXf8Ox3#u3H#IiY*VWckS5;P&mz9GzJE102GaYNdN!< literal 0 HcmV?d00001 diff --git a/doc/assets/img/nav-bg.gif b/doc/assets/img/nav-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..474396561daa9bebc874426b013e976333fe0153 GIT binary patch literal 1238 zcmZ?wbhEHbG+{7dXkcK_($X?DHC6o29pM|G;F4I92&8T7D+&^mvr|hHl2X$%^K6yg z@7}MZkeOnu6mIHk;9KCFnvv;IRg@ZBBb2320kUN}5%WiyPD~AkS7Qqokz3N?*Ucyj-u` zSTDaQUEk2s(o)~RNZ-gv7pOwFxH7LKu|hYmSQ%!5OKNd)QD#9&W`3Rm$i&2?{L&Iz zC7??oUdSzg8=F_G2lkF$a(=FUMPh-zp`HQAOE87LzW9~q=E7AMmjtCE+>6!V;*iRM zRQ;gT;{4L0QdGl)fawRsgeP1e2cGm(^ML8S2$--L|Nr~@=l8FlKfZta z`sMSdk00K@d;8|~tCugHKYRM*@uPti4*$!dV9LNIy>6iT3ec%8XM~CYHO;iDl5v%N=u513Jdb{a&xk?GBeWC zQd5$X5)DCA|t}XLPLUs0t5X0e0{vVJU!gqTwR=<93AZKY;CNqEG^8*hTC z__d<1|JvQk-S_wrYXxUpIrT POmstylesheet=assets/css/theme.css + ; + + +local rule highlight-theme ( name ) { + local helper = $(name)-hl ; + local helper-source = $(helper:S=.adoc) ; + + make $(helper-source) : : @link.touch ; + + html $(helper) + : $(helper-source) + : linkcss + source-highlighter=pygments + pygments-css="class" + pygments-linenums-mode=inline + pygments-style=$(name) + ; + + explicit $(helper-source) $(helper) ; + + local target = pygments-$(name).css ; + sibling $(target) + : $(helper) + : usage-requirements + source-highlighter=pygments + pygments-linenums-mode=inline + pygments-style=$(name) + ; + return $(target) ; +} + +local hl-theme = [ highlight-theme paraiso-dark ] ; +# monokai +# friendly + + +local rule templates-dir ( path : includes ? ) { + local templates = [ glob-tree-ex $(path) : * ] ; + if $(includes) { templates += [ glob-tree-ex $(includes) : * ] ; } + + return + "-T $(path)" + $(templates) + layout-include=$(includes) + ; +} + + +alias common-attributes + : sources + theme + $(hl-theme) + : usage-requirements + nofooter + source-highlighter=pygments + pygments-linenums-mode=inline + + icons=font + + [ templates-dir templates : include ] + + base-url="$(doc-prefix)" + project-title=enum-flags + project-repository="http://github.com/grisumbras/enum-flags" + ; + + +rule try-example ( source ) { return [ run $(source) /enum-flags//libs ] ; } +alias examples : [ sequence.transform try-example : [ glob examples/*.cpp ] ] ; + + +html index : index.adoc common-attributes examples theme ; + + +alias install + : [ install (htmldir) : index ] + [ install (htmldir)/assets/css : theme $(hl-theme) ] + [ install (htmldir)/assets/img + : [ glob assets/img/*.png ] [ glob assets/img/*.gif ] + ] + ; +explicit install ; diff --git a/doc/examples/example0.cpp b/doc/examples/example0.cpp new file mode 100644 index 000000000..4bb8bf4ad --- /dev/null +++ b/doc/examples/example0.cpp @@ -0,0 +1,12 @@ +#include + +enum class MyEnum { Value1 = 1 , Value2 = 2 }; +ALLOW_FLAGS_FOR_ENUM(MyEnum) + +int main() { + auto mask = MyEnum::Value1 | MyEnum::Value2; + if (mask & MyEnum::Value2) { + // do something + } + return 0; +} diff --git a/doc/include/head.html.erb b/doc/include/head.html.erb new file mode 100644 index 000000000..ef2189c81 --- /dev/null +++ b/doc/include/head.html.erb @@ -0,0 +1,28 @@ + + +<% + p = attr 'project-title' + t = doctitle(:sanitize => true, :use_fallback => true) + if t = p + t = 'Home' + end +%> +<%=p%> | <%=t%><% + [:description, :keywords, :author, :copyright].each do |key| + if attr? key %> +<% + end + end %> + + + + + + + + + + + + + diff --git a/doc/include/header.html.erb b/doc/include/header.html.erb new file mode 100644 index 000000000..e56c091e8 --- /dev/null +++ b/doc/include/header.html.erb @@ -0,0 +1,15 @@ + diff --git a/doc/include/main_title.html.erb b/doc/include/main_title.html.erb new file mode 100644 index 000000000..c7f5022f0 --- /dev/null +++ b/doc/include/main_title.html.erb @@ -0,0 +1,26 @@ +
<% + p = attr 'project-title' + t = doctitle(:sanitize => true, :use_fallback => true) + if t != p %> + + <% end %> +

<%=t%>

<% + if attr? 'subtitle' %> +

<%= attr 'subtitle' %>

+ <% end %> +
+ + Project maintained by + grisumbras + + + Hosted on GitHub Pages — + Theme by mattgraham + +
diff --git a/doc/index.adoc b/doc/index.adoc new file mode 100644 index 000000000..2ba21200d --- /dev/null +++ b/doc/index.adoc @@ -0,0 +1,22 @@ += enum-flags +:subtitle: Bit flags for C++11 scoped enums + +*enum-flags* is a C++ library that allows you to convert scoped enums into bit +flags. + +You can use it as simple as this: + +[source, c++] +---- +include::examples/example0.cpp[] +---- + +== Documentation + +* *link:overview/index.html[Overview]* + + An overview of the features and the design. + +* *link:tutorial/index.html[Tutorial]* + + A tutorial that shows how to use the library. + +* *link:reference/index.html[Reference]* + + API reference. diff --git a/doc/templates/document.html.erb b/doc/templates/document.html.erb new file mode 100644 index 000000000..40715c9c1 --- /dev/null +++ b/doc/templates/document.html.erb @@ -0,0 +1,54 @@ +<%#encoding:UTF-8%><% +require "erb" + +def include_file file + path = (attr 'layout-include', '.') + '/' + file + content = File.read(File.expand_path(path)) + p = ERB.new(content) + p.result(binding) +end +%> +> + + <%= include_file 'head.html.erb' %> + +> + <%= include_file 'header.html.erb' %> +
+
+
+ <%= include_file 'main_title.html.erb' %> + +
+ <%= content %> +
+
+ +
+
+ + diff --git a/exports/build.jam b/exports/build.jam index 29d09eacb..5655f3742 100644 --- a/exports/build.jam +++ b/exports/build.jam @@ -1,50 +1,62 @@ -import install-path ; import make ; +import path ; import print ; +import property-set ; +import install-extra : install ; -prefix = [ install-path.prefix enum-flags ] ; -execprefix = [ install-path.exec-prefix $(prefix) ] ; -libdir = [ install-path.libdir $(execprefix) ] ; -includedir = [ install-path.includedir $(prefix) ] ; + +local installed ; make enum-flags.pc : : @write-pc ; -install install-pc : enum-flags.pc : $(libdir)/pkgconfig ; +installed += [ install (libdir)/pkgconfig : enum-flags.pc ] ; make enumflags-config.cmake : : @write-cmake-config ; make enumflags-config-version.cmake : : @write-cmake-version ; -install install-cmake +installed += + [ install (datarootdir)/cmake/enumflags-$(VERSION) : enumflags-config.cmake enumflags-config-version.cmake - : $(libdir)/cmake/enumflags-$(VERSION) - ; + ] ; -alias install : install-pc install-cmake ; -explicit install install-pc install-cmake ; +alias install : $(installed) ; +explicit install ; rule write-pc ( target : sources * : properties * ) { + local dirs = [ installdirs prefix : $(properties) ] ; write $(target) - : "Name: enum-flags" + : "prefix=$(dirs[2])" + "includedir=${prefix}/$(dirs[1])" + "" + "Name: enum-flags" "Description: Bit-flags for C++ scoped enums" "Version: $(VERSION)" - "Cflags: -I$(includedir)" + "Cflags: -I${includedir}" "" ; } rule write-cmake-config ( target : sources * : properties * ) { + local dirs = [ installdirs datarootdir : $(properties) ] ; + local cmakedir = [ path.join $(dirs[2]) cmake/enumflags-$(VERSION) ] ; + local to-prefix = [ path.reverse $(cmakedir) ] ; write $(target) : "if(TARGET EnumFlags::EnumFlags)" " return()" "endif()" "" + "get_filename_component(" + " _IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_DIR}/$(to-prefix)\" ABSOLUTE" + ")" + "" "add_library(EnumFlags::EnumFlags INTERFACE IMPORTED)" "set_target_properties(" " EnumFlags::EnumFlags" - " PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"$(includedir)\"" + " PROPERTIES" + " INTERFACE_INCLUDE_DIRECTORIES \"${_IMPORT_PREFIX}/$(dirs[1])\"" ")" "" ; @@ -55,14 +67,12 @@ rule write-cmake-version ( target : sources * : properties * ) { write $(target) : "set(PACKAGE_VERSION $(VERSION))" "" - "if(NOT PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION EQUAL $(VERSION))" + "if(NOT PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION STREQUAL $(VERSION))" " set(PACKAGE_VERSION_EXACT TRUE)" " set(PACKAGE_VERSION_COMPATIBLE TRUE)" - " set(PACKAGE_VERSION_UNSUITABLE FALSE)" "else()" " set(PACKAGE_VERSION_EXACT FALSE)" " set(PACKAGE_VERSION_COMPATIBLE FALSE)" - " set(PACKAGE_VERSION_UNSUITABLE TRUE)" "endif()" "" ; @@ -71,5 +81,13 @@ rule write-cmake-version ( target : sources * : properties * ) { local rule write ( target : content * ) { print.output $(target) ; - print.text $(content) ; + print.text $(content) : overwrite ; +} + + +local rule installdirs ( dir : properties * ) { + local ps = [ property-set.create $(properties) ] ; + local includedir = [ install-extra.get-dir includedir : $(ps) : relative ] ; + local otherdir = [ install-extra.get-dir $(dir) : $(ps) : relative ] ; + return $(includedir) $(otherdir) ; } diff --git a/exports/install-path.jam b/exports/install-path.jam deleted file mode 100644 index 084e64909..000000000 --- a/exports/install-path.jam +++ /dev/null @@ -1,38 +0,0 @@ -import modules ; -import option ; -import property ; - - -rule prefix ( package-name : requirements * ) { - local prefix - = [ option.get prefix - : [ property.select : $(requirements) ] - ] ; - prefix = $(prefix:G=) ; - requirements - = [ property.change $(requirements) : ] ; - - if ! $(prefix) { - if [ modules.peek : NT ] { - prefix = C:\\$(package-name) ; - } else if [ modules.peek : UNIX ] { - prefix = /usr/local ; - } - } - return $(prefix) ; -} - - -rule exec-prefix ( prefix ) { - return [ option.get execprefix : $(prefix) ] ; -} - - -rule libdir ( execprefix ) { - return [ option.get libdir : $(execprefix)/lib ] ; -} - - -rule includedir ( prefix ) { - return [ option.get includedir : $(prefix)/include ] ; -} diff --git a/jamroot.jam b/jamroot.jam index 1d5bfedb6..d67aa5989 100644 --- a/jamroot.jam +++ b/jamroot.jam @@ -1,5 +1,5 @@ -import package ; -import path ; +import install-extra : install ; +import option ; project enum-flags ; @@ -10,15 +10,19 @@ constant VERSION : 0.1.0 ; alias libs : usage-requirements include ; -package.install headers enum-flags +local installed = exports//install ; +installed += + [ install (includedir)/enum-flags + : [ glob-tree-ex include : *.hpp ] : include - : - : - : [ path.glob-tree include : *.hpp ] - ; -explicit headers ; + ] ; -package.install-data license : enum-flags : LICENSE ; +installed += [ install (docdir) : LICENSE ] ; -alias install : headers license exports//install ; -explicit install headers license ; +if [ option.get with-docs : : yes ] { + build-project doc ; + installed += doc//install ; +} + +alias install : $(installed) ; +explicit install ;