diff --git a/articles.dd b/articles.dd deleted file mode 100644 index 35eb1b6fff..0000000000 --- a/articles.dd +++ /dev/null @@ -1,163 +0,0 @@ -Ddoc - -$(D_S Articles, - $(P - More articles can be found on the corresponding - $(LINK2 http://wiki.dlang.org/Articles, wiki page). - ) - - $(DIVC boxes, - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)faq.html, FAQ)) - $(P Frequently answered questions about D.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)const-faq.html, const(FAQ))) - $(P Frequently answered questions about D's $(D const) and - $(D immutable).) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)d-floating-point.html, Floating Point)) - $(P Don Clugston goes into detail about floating point - numbers in D and the pitfalls one may encounter.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)warnings.html, Warnings)) - $(P This is about compiler warnings in general, and dmd's - warnings in particular.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)rationale.html, Rationale)) - $(P Questions about the reasons for various design decisions for - D often come up. This addresses many of them.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)builtin.html, Builtin Rationale)) - $(P D offers several capabilities built in to the core language - that are implemented as libraries in other languages. This - article answers why.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)ctod.html, C to D)) - $(P Coming from C? Here are various examples comparing $(I the D - way) to $(I the C way).) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)cpptod.html, C++ to D)) - $(P Coming from C++? Here are various examples comparing $(I the - D way) to $(I the C++ way).) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)pretod.html, C Preprocessor vs D)) - $(P D doesn't have a preprocessor. This article shows how to do - in D what would be a task for the preprocessor in C.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)code_coverage.html, Code coverage analysis)) - $(P D compilers come with a builtin code coverage analyzer. - This article explains why and how to use it.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)exception-safe.html, Exception Safety)) - $(P This article is about exceptions and how RAII and scope - guard statements relate to them.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)hijack.html, Hijacking)) - $(P Function hijacking is when old code accidentally calls - a newly added or changed function because it shadows the - intended one. This article is about how D prevents - different kinds of hijacking.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)intro-to-datetime.html, Introduction to - std.datetime)) - $(P Jonathan M Davis presents $(D std.datetime) which was added - in version 2.052 (Jul 10, 2011), and compares it to the - superseded $(D std.date).) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)lazy-evaluation.html, Lazy Evaluation)) - $(P Walter Bright goes into the details of lazy parameters in - D.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)migrate-to-shared.html, Migrating to Shared)) - $(P Since version 2.030 (May 11, 2009) D uses thread local - storage (TLS) by default for static and global variables. - The article shows the alternatives to TLS that are available - in D.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)mixin.html, Mixins)) - $(P A short article about D's $(D mixin) statement which allows - to insert arbitrary code from a string, and how it compares - to the C preprocessor.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)regular-expression.html, Regular Expressions)) - $(P Dmitry Olshansky shows how to use regular expressions in D - with $(D std.regex).) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)safed.html, SafeD)) - $(P Bartosz Milewski writes about SafeD, the memory-safe - subset of D.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)templates-revisited.html, Templates Revisited)) - $(P Walter Bright writes about how D improves upon C++ - templates.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)ctarguments.html, Compile-time Argument - Lists)) - $(P A compile-time list is a list of compile-time entities - - types, symbols (names) and expressions (values). This - article shows how to work with them.) - ) - ) - $(DIVC row, - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)variadic-function-templates.html, - Variadic Templates)) - $(P This article is about the D idiom of implementing variadic - functions with variadic templates.) - ) - $(DIVC item, - $(H4 $(LINK2 $(ROOT_DIR)d-array-article.html, D Slices)) - $(P Steven Schveighoffer writes about slices and dynamic arrays - in D. Unfortunately, this article uses slightly different - terminology than the language reference: What the article - calls a $(I slice) is a $(I dynamic array) in the language - reference, and what the article calls a $(I dynamic array) - is not named specifically by the language reference. Still, - the article is a great help in getting a good understanding - of D's array semantics.) - ) - ) - ) -) - -Macros: - TITLE=Articles - SUBNAV=$(SUBNAV_ARTICLES) diff --git a/articles.html b/articles.html new file mode 100644 index 0000000000..abf324bdf5 --- /dev/null +++ b/articles.html @@ -0,0 +1,9 @@ + + +
+sections */ .bnf /* grammar */ { background-color: white; + color: #000066; } .ddoccode { background-color: #f3eeee; + color: #000066; } .console /* command line console */ { - background-color: #333; - border-color: #333; - color: #F5F5F5; -} -.console a -{ - color: #D8645E; -} -.console a:hover -{ - color: #F47069; + background-color: #f7f7f7; + color: #181818; } .moddeffile /* module definition file */ @@ -1039,20 +564,40 @@ body.dcompiler dt a.anchor:hover:before color: #111199; } -.d_code, .d_code2 /* D code */ +.d_code /* D code */ +{ + background-color: #fcfcfc; + color: #000066; +} + +.d_code2 /* D code */ { background-color: #fcfcfc; + color: #000066; } .asmcode /* Asm code */ { background-color: #afcbde; - border-color: #afcbde; + color: #000066; +} + +.ccode /* C code */ +{ + background-color: #f6ecf0; + color: #000066; +} + +.cppcode /* C++ code */ +{ + background-color: #f6ecf0; + color: #000066; } -.ccode, .cppcode, .cppcode2 /* C/C++ code */ +.cppcode2 /* C++ code */ { background-color: #f6ecf0; + color: #000066; } td .d_code2, td .cppcode2, td .cppcode @@ -1063,136 +608,227 @@ td .d_code2, td .cppcode2, td .cppcode .d_inlinecode { + font-family: monospace; + /* font-size: 1.2em; */ font-weight: bold; } -/* syntax highlighting - -d_* classes come from Ddoc. -cm-* classes come from CodeMirror. - -These classes come from prettify.js: -.pln - plain text -.str - string content -.kwd - keyword -.com - comment -.typ - type name -.lit - literal value -.pun - punctuation -.opn - lisp open bracket -.clo - lisp close bracket -.tag - markup tag name -.atn - markup attribute name -.atv - markup attribute value -.dec - declaration -.var - variable name -.fun - function name +/* Elements of D source code text */ +.d_comment { color: green; } +.d_string { color: red; } +.d_keyword { color: blue; } +.d_psymbol { text-decoration: underline; } +.d_param { font-style: italic; } -*/ +/* Focal symbol that is being documented */ +.ddoc_psymbol { color: #336600; } -.d_comment, -.cm-s-eclipse span.cm-comment, -.com +div#top, div#navigation +{ + width: 16em; + background: #333; /*hsl(0, 0%, 20%)*/ + border: 0.25em none #191919; /*hsl(0, 0%, 10%)*/ + border-right-style: solid; +} +div#top { - color: #999; + position: absolute; + top: 0; + left: 0; + font-size: 0.875em; + min-height: 100%; } -.d_string, -.cm-s-eclipse span.cm-string, .cm-s-eclipse span.cm-string-2, -.str, .atv +div#header { - color: #DC4040; + position: relative; + z-index: 1; /* i.e. higher than #navigation's */ } -.d_keyword, -.cm-s-eclipse span.cm-keyword, .cm-s-eclipse span.cm-builtin, -.kwd +img { - color: #4040DC; + border: 0; } -.d_param +div#header a.logo { - font-style: italic; + display: block; + text-align: center; + padding: 1em 0; } -/* .cm-meta is here because it and .lit both match @-attributes */ -.cm-s-eclipse span.cm-number, .cm-s-eclipse span.cm-meta, -.lit +img#logo { - color: #8E00DC; + vertical-align: text-bottom; } +div#header a#d-language { - color: #333; + display: block; + font-variant: small-caps; + text-align: center; + color: white; + text-decoration: none; + line-height: 1.4em; } -.cm-s-eclipse span.cm-attribute, -.atn +img#github-ribbon { - color: #9ad452; + position: absolute; + top: -15px; + right: 0; + border: 0; + z-index: 1; } -.cm-s-eclipse span.cm-tag, -.tag +div#search-box, span#search-query, span#search-dropdown, span#search-submit { - color: #ffaa00; + border: 0.1em none #aaa; } -.cm-s-eclipse span.cm-error +div#search-box { - color: #f00; + white-space: nowrap; + margin: 3em 1em; + -webkit-border-radius: 0.3em 0.3em 0.3em 0.3em; + -moz-border-radius: 0.3em 0.3em 0.3em 0.3em; + border-radius: 0.3em 0.3em 0.3em 0.3em; + background: #F6F6F6; + border-style: solid; } -.cm-s-eclipse span.cm-def, .cm-s-eclipse span.cm-operator, -.cm-s-eclipse span.cm-property, .cm-s-eclipse span.cm-variable, -.cm-s-eclipse span.cm-variable-2, .cm-s-eclipse span.cm-variable-3, -.pln, .fun -.dec, .var +span#search-query, span#search-dropdown, span#search-submit +{ + vertical-align: top; + line-height: 1.3em; + height: 1.8em; +} +span#search-dropdown, span#search-submit { - color: #333; + display: inline-block; } -.cm-s-eclipse span.cm-word {color: #006;} -.cm-s-eclipse span.cm-atom {color: #219;} -.cm-s-eclipse span.cm-qualifier {color: #555;} -.cm-s-eclipse span.cm-bracket {color: #cc7;} -.cm-s-eclipse span.cm-link {color: #219;} +span#search-query input, span#search-dropdown select, span#search-submit button +{ + background: transparent; + color: black; + border: none; + margin: 0; + padding: 0 0.5em; + width: 100%; + height: 100%; + outline: none; +} +span#search-query +{ + display: block; + border-bottom-style: solid; +} -/* Focal symbol that is being documented */ -.d_psymbol, .ddoc_psymbol +span#search-dropdown { -/* color: #B03931; */ - font-weight: bold; + position: relative; + border-right: none; + overflow: hidden; + width: 11em; + /* + = 16em [#navigation's width] + - 2 * 1em [#search-box's margin-{left,right}] + - 3em [#search-submit's width] + */ } -.d_decl +span#search-dropdown select { - background: #F5F5F5; - border-left: 5px solid #B03931; - text-align: left; - border-top-left-radius: 4px; - border-top-right-radius: 4px; + position: relative; + width: 14em; /* Pushing the native dropdown arrow into invisibility. */ + z-index: 1; } -.d_decl > div + +span#search-dropdown:after { - border: 1px solid #E6E6E6; - border-top-right-radius: 4px; - padding: 0.6em 1em; + content: "\f107"; /* angle down */ + font-family: FontAwesome; + position: absolute; + height: 10px; + width: 1em; + top: 50%; + margin-top: -0.5em; + right: 0.2em; } -.d_decl + dd +span#search-submit { - border: 1px solid #E6E6E6; - border-top: none; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; + line-height: 1.2em; + width: 3em; + /* + = 16em [#navigation's width] + - 2 * 1em [#search-box's margin-{left,right}] + - 11em [#search-submit's width] + */ + border-left-style: solid; + margin-left: -0.1em; /* = border-width */ } -img +span#search-submit span /* hide 'go' */ { - border: 0; + display: none; +} + + +div#navigation +{ + position: relative; + font-size: 0.875em; + float: left; + margin-top: 2.4em; + /* + = - 1em [body::before pseudo-padding] + + 2 * 1em [div#header a.logo's padding-{top,bottom}] + + 1.4em [#d-language's line-height] + */ + padding-top: 95px; /* = #logo's height */ +} + +div#content +{ + text-align: justify; + min-height: 440px; + margin-left: 18em; + /* + = 16em [#navigation's width] + + 2em [inter-column space] + */ + margin-right: 1em; + padding: 1.6em; + padding-top: 1.3em; + padding-bottom: 1em; + background-color: #f6f6f6; + font-size: 0.875em; + line-height: 1.4em; + border: 0.25em solid #ccd5d5; +} + +/* This is a CSS hack to only target Blink based browsers + Targets Chrome 28 and later and Opera 14 and later +*/ +@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) { + div#content + { + /* because Blink based browsers don't support hyphens */ + text-align: left; + } +} + +body#Home div#content +{ + margin-right: 21em; + /* + = 1em [#news's margin-right] + + 18em [#news's width] + + 2em [inter-column space] + */ } body.chm div#news, @@ -1225,246 +861,291 @@ body.chm dt.d_decl width: 100%; } -body#Home > .container +span#wiki { - max-width: none; - padding: 0; + position: relative; + right: 0; + z-index: 2; +} + +body#Home #content { + margin-right:20em; } -body#Home #content #tools, -body#Home #content > .intro +div#news { - background: #F5F5F5; + font-size: 0.875em; + float: right; + width: 18em; + margin-right: 1em; } -body#Home #content > h1 +div#twitter { - margin: 0; + color: white; } -body#Home #content > .intro +div#forum-summary { - padding-bottom: 1em; - border-bottom: 1px solid #E6E6E6; + color: white; + width: 100%; + margin-right: 1em; } -body#Home #content > .intro > div > div +div#forum-summary > iframe { - display: table; + border: 0; width: 100%; + height: 210px; } -body#Home #content > .intro > div > div > * +div.navblock { - display: table-cell; + margin-top: 0; + margin-bottom: 1em; } -body#Home #content > .intro .pitch +div#navigation .navblock h2 { - font-size: large; - font-weight: 300; - margin: auto; - width: 21em; + font-family: Verdana, "Deja Vu", "Bitstream Vera Sans", sans-serif; + font-size: 1.35em; + color: #ccc; + margin: 0; } -body#Home #content > .intro .download +div#navigation .navblock ul { - margin-top: 3em; - text-align: center; + list-style-type: none; + margin: 0; + padding: 0; } -body#Home #content > .intro .download .btn +div#navigation .navblock li { - margin-bottom: 0.3em; + margin: 0 0 0 0.8em; + padding: 0; } -body#Home #content > .intro #your-code-here +#navigation .navblock a { - padding-left: 1em; - position: relative; - width: 32em; + display: block; + color: #ccc; + text-decoration: none; + padding: 0.1em 0; + border-bottom: 1px dotted #494949; } -body#Home #content > .intro #your-code-here .tip +#navigation .navblock a:hover { - position: absolute; - top: 0.1em; - right: 0.3em; - z-index: 1; + color: #eee; } -body#Home #content > .intro #your-code-here pre +#navigation .navblock a.active { - margin: 0; + color: white; + border-color: white; +} + + +div#translate +{ + margin-top: 3em; + margin-left: 0; + color: #ccc; } -body#Home div#news + +div#tools { + display: inline; float: right; - width: 252px; + margin: + -1.1em /* = -(1.3em [#content's padding-top] - 0.2em) */ + -1.4em /* = -(1.6em [#content's padding-right] - 0.2em) */ + 1em 1em; + text-align: right; } -body#Home div#forum-summary +body#Downloads div#tools { - color: white; - width: 100%; - margin-right: 1em; + padding-right: 149px; /* = width of github-ribbon.png */ } -body#Home div#forum-summary > iframe +div#tools a.button { - border: 0; - width: 100%; - height: 210px; + -moz-box-shadow:inset 0 1px 0 0 #ffffff; + -webkit-box-shadow:inset 0 1px 0 0 #ffffff; + box-shadow:inset 0 1px 0 0 #ffffff; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) ); + background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% ); + background:-o-linear-gradient(top, #ededed, #dfdfdf); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf'); + background-color:#ededed; + border:1px solid #aaa; + display:inline-block; + color:#555; + font-family:arial; + font-size:72%; + font-weight:bold; + padding:0 6px; + text-decoration:none; + text-shadow:1px 1px 0 #ffffff; +} + +div#tools a.button:hover +{ + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) ); + background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% ); + background:-o-linear-gradient(top, #dfdfdf, #ededed); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed'); + background-color:#dfdfdf; +} + +div#tools a.button:active +{ + position: relative; + top: 1px; +} + +div#tools img +{ + vertical-align: middle; +} + +.tip { + position: relative; } -body#Home .more .boxes, body#Home .more .whyd -{ - margin-right: 252px; /* prevent overlapping with #news */ - padding-right: 4em; +.tip span { + display: none; + position: absolute; + top: 25px; + left: auto; + right: 0; + width: 200px; + padding: 8px !important; + z-index: 100; + background: #000; + color: #eee !important; + font-style: normal !important; + font-size: 72%; + text-align: left; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + + /* undo inherited attributes */ + text-shadow: none; } -body#Home .boxes .item .big-icon -{ - padding-right: 0.5em; +.tip:hover span { + display: block; } -body#Home .whyd .section -{ - margin-bottom: 1.5em; - border-left: 5px solid #B03931; - border-radius: 4px; -} -body#Home .whyd .section > div -{ - border: 1px solid #E6E6E6; - border-left: none; - border-radius: 4px; - padding: 1.5em; -} -body#Home .whyd .section > div > *:first-child -{ - margin-top: 0; -} -body#Home .whyd .section > div > *:last-child -{ - margin-bottom: 0; -} -body#Menu #content li.expand-container a::after +div#content li { - content: ""; + padding-bottom: .7ex; } -body#Menu #content li.expand-container ul -{ - display: block; -} -.boxes +div#footernav { - margin: 2em 0; + clear: both; + padding: 1em 2em 0 2em; + color: #666; + text-align: center; + font-size: 80%; } -.boxes .row +div#footernav a { - display: table-row; + color: #ccc; } -.boxes .item +div#footernav a:hover { - display: table-cell; - width: 50%; + color: white; } -.boxes > .row > .item + +div#copyright { padding: 1em 2em; + color: #ccc; + font-size: 50%; + text-align: center; } -.boxes > .row > .item > h4:first-child +div#copyright a { - margin-top: 0; + color: #ccc; } -.boxes > .row:first-child > .item -{ - padding-top: 0; -} -.boxes > .row:last-child > .item +/* These are for the newsgroup archives */ +div#newsnav { - padding-bottom: 0; + margin-top: -1.5em; + margin-bottom: -1em; } - -.boxes > .row > .item:first-child +div#Posting { - padding-left: 0; + border: 1px solid #cccccc; + margin-bottom: 1em; } - -.boxes > .row > .item:last-child +div#PostingHeading { - padding-right: 0; + font-family: Georgia, "Times New Roman", Times, serif; + font-size: larger; + color: #633; + background-color: #eeeeee; } - -.tip +div#PostingHeading img { - font-size: small; - position: relative; + vertical-align: middle; } - -.tip > div +div#PostingHeading a { - display: none; - position: absolute; - top: 25px; - left: auto; - right: 0; - width: 19em; - padding: 8px; - z-index: 100; - background: #555; - color: white; - font-style: normal; - text-align: left; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; + text-decoration: none; } - -.tip:hover > div +div#PostingFooting { - display: block; + font-size: smaller; + background-color: #eeeeee; } - -.tip > div > *:first-child +div#PostingTOC { - margin-top: 0; + font-size: smaller; } -.tip > div > *:last-child +div#PostingTOC li { - margin-bottom: 0; + margin-left: 0; } - -div#copyright +div#PostingTOC a { - padding: 1em 2em; - clear: both; - text-align: center; + font-family: Georgia, "Times New Roman", Times, serif; } - -.smallprint, .smallprint a +.PostingBody /* newsgroup posting */ { - color: #999; - font-size: small; + border: 0; + margin: 0; + background-color: #fcfcfc; + color: #000066; + margin-left: 0; + min-width: 15em; + padding-bottom: 0.5em; } - -.smallprint a:hover +.PostingQuote /* quote inside newsgroup posting */ { - color: #555; + border: 1px solid #666666; + font-size: 90%; + background-color: inherit; + color: #666666; + margin-left: 0; + min-width: 15em; } - /* These are for the changelogs */ div.version { @@ -1472,6 +1153,7 @@ div.version } div.version font { + font-family: Georgia, "Times New Roman", Times, serif; color: #633; } div.version li @@ -1486,14 +1168,56 @@ div.changelog-nav } +/* These are for comparison.html */ +table.comp /* "comparison with D": table */ +{ + background-color:#e9e6dd; +} +table.comp a +{ + color: black; +} +td.compNo /* comparison with D: "NO" */ +{ + background-color:red; + text-align:center; +} +td.compYes /* comparison with D: "YES" */ +{ + background-color:#00FF00; + text-align:center; +} + + .leadingrow { background-color: #E4E9EF; font-size: 110%; } +.d_inlinecode +{ + font-family: "Consolas", + "Bitstream Vera Sans Mono", + "Andale Mono", + "Monaco", + "DejaVu Sans Mono", + "Lucida Console", + monospace; +} + +.d_decl { + font-weight: bold; + background-color: #E4E9EF; + font-family: 'Inconsolata', monospace; + font-size: 16px; + border-bottom: solid 2px #336600; + padding: 2px 0 2px 2px; + text-align: left; +} + .quickindex { font-weight: normal; - background-color: #F5F5F5; + background-color: #E4E9EF; } .quickindex a { @@ -1504,9 +1228,10 @@ div.changelog-nav text-decoration: underline; } -.question, .question * +.question { display: inline; + color: #006; text-decoration: underline; cursor:pointer; /* Cursor is like a hand when someone rolls the mouse over the question */ } @@ -1530,6 +1255,8 @@ textarea.d_code_output, textarea.d_code_stdin, textarea.d_code_args text-align: left; border: none; width: 98%; + font-size: 1.09em; + font-family: monospace; padding: 5px; margin: 1px; word-wrap: break-word; @@ -1539,8 +1266,8 @@ textarea.d_code_output, textarea.d_code_stdin, textarea.d_code_args outline: none; } -div.d_code {margin: 0; padding: 0; background: #F5F5F5;} -div.d_run_code {display: none;} +div.d_code {margin: 0; padding: 0; font-size: 100%; margin-bottom: -14px; background: #F6F6F6;} +div.d_run_code {display: none; margin: 1em 0 1em 3.1em;} div.d_code_output, div.d_code_stdin, div.d_code_args, div.d_code_unittest { border: 1px solid #CCC; @@ -1550,10 +1277,31 @@ div.d_code_output, div.d_code_stdin, div.d_code_args, div.d_code_unittest width: 100%; } -.d_code_title {font-weight: bold;padding: 5px;} +.d_code_title {font-weight: bold;font-size: 100%;padding: 5px;} .CodeMirror-wrap {padding: 3px;} -.CodeMirror {line-height: normal; border: 1px solid #CCC; background: #FCFCFC; } +.CodeMirror {line-height: normal; font-size: 117%;border: 1px solid #CCC;background: white; } +.cm-s-eclipse span.cm-word {color: #006;} +.cm-s-eclipse span.cm-meta {color: #FF1717;} +.cm-s-eclipse span.cm-keyword { color: blue; } +.cm-s-eclipse span.cm-atom {color: #219;} +.cm-s-eclipse span.cm-number {color: #006;} +.cm-s-eclipse span.cm-def {color: #006;} +.cm-s-eclipse span.cm-variable {color: #006;} +.cm-s-eclipse span.cm-variable-2 {color: #006;} +.cm-s-eclipse span.cm-variable-3 {color:#006;} +.cm-s-eclipse span.cm-property {color: black;} +.cm-s-eclipse span.cm-operator {color: black;} +.cm-s-eclipse span.cm-comment {color: green;} +.cm-s-eclipse span.cm-string {color: red;} +.cm-s-eclipse span.cm-string-2 {color: red;} +.cm-s-eclipse span.cm-error {color: #f00;} +.cm-s-eclipse span.cm-qualifier {color: #555;} +.cm-s-eclipse span.cm-builtin {color: #30a;} +.cm-s-eclipse span.cm-bracket {color: #cc7;} +.cm-s-eclipse span.cm-tag {color: #170;} +.cm-s-eclipse span.cm-attribute {color: #00c;} +.cm-s-eclipse span.cm-link {color: #219;} .cm-s-eclipse .CodeMirror-matchingbracket {border:1px solid grey;color:black !important;} input.runButton, input.resetButton, input.argsButton, input.inputButton, input.editButton @@ -1598,13 +1346,18 @@ input.editButton:active input.resetButton{display: none} /* Runnable-examples css -end */ +div#mobile-top, div#mobile-search, img#mobile-hamburger +{ + display: none; +} + .page-contents { width: 300px; padding-right: 10px; - border: solid #333; + border: solid black; border-width: 2px 0; - font-size: small; + font-size: 12px; text-align: left; margin: 0 0 2em 2em; } @@ -1622,14 +1375,13 @@ input.resetButton{display: none} margin-top: 0; } -.page-contents li +div#content .page-contents li { line-height: 1.3; padding-bottom: 0; } -@media only screen and (min-width: 66em) -{ +@media only screen and (min-width: 64em) { /* 1024px for default font-size 16 */ pre { overflow: auto; @@ -1641,340 +1393,159 @@ input.resetButton{display: none} } } -/* Narrow layout stage 1: dropdown search, dropdown subnav */ -@media only screen and (max-width: 66em) -{ - #top .search-container.expand-container .expand-toggle - { - display: block; - } - - #top .expand-container > #search-box - { - background: #B03931; - border: 1px solid #98312A; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; +@media only screen and (max-width: 64em) { /* 1024px for default font-size 16 */ + div#news{ display: none; - padding: 0.6em; - position: absolute; - top: 100%; - right: 0; - width: auto; - z-index: 5; } - #top .expand-container.open > #search-box - { - display: block; + div#content{ + margin-right: 1em !important; } +} - body#Home #content > .intro .pitch - { - width: 15em; - } +@media only screen and (max-width: 50em) { /* 800px for default font-size 16 */ - .subnav - { - float: none; - border-bottom-width: 1px; - border-right-width: 0; - margin: 0 -1em; - padding: 0.6em 1em; - width: auto; - } + /* Disable desktop-size UI elements */ - body .subnav.expand-container > * - { + div#news { display: none; } - .subnav.open - { - padding-bottom: 1em; - } - - body.doc .subnav > ul, - body.std .subnav > ul > li > ul - { - -moz-column-width: 17em; - -webkit-column-width: 17em; - column-width: 17em; - } - - body.doc .subnav > ul > li, - body.std .subnav > ul > li > ul > li - { - overflow: auto; /* avoid column breaks inside li */ - } - - .subnav h2 - { - border-bottom-style: none; - margin-right: 0; - margin-top: 0; - padding-top: 1em; - } - - /* Without JS, display the head section (h2, subhome link, ...) on one line. - With JS, display the toggle, and hide the other h2. */ - .subnav > * - { - display: none; - } - .subnav > .head - { - display: block; - word-spacing: 1em; - } - .subnav > .head > * - { - display: inline; - word-spacing: 0; - } - .subnav > .head br - { - display: none; - } - .sunbav .subnav-duplicate - { - display: block; - } - .subnav > .head .separator::after - { - content: "\2013"; /* U+2013 EN DASH */ - } - body.have-javascript .subnav.expand-container > .head > *, - body.have-javascript .subnav.expand-container.open > .head > h2, - body.have-javascript .subnav.expand-container.open > .head > .subnav-duplicate - { - display: none; - } + /* Header */ - body.have-javascript .subnav.expand-container > h2.expand-toggle, - body.have-javascript .subnav.expand-container.open > .head > *, - body.have-javascript .subnav.expand-container > .head br - { + div#top { + position: relative; + width: auto; display: block; - } - body.have-javascript .subnav > h2.expand-toggle - { - margin: 0; - padding: 0; - } - body.have-javascript .head .separator::after - { - content: none; - } - body.have-javascript .subnav.open > h2 - { + border-right-style: none; border-bottom-style: solid; - margin-bottom: 1em; - } - - .subnav + #content - { - margin-left: 0; - } - - .subnav-helper - { - display: none; - } -} - -/* Narrow layout stage 2: hamburger menu, forum/twitter widgets disappear from -the home page, intro pitch and your-code-here layed out vertically */ -@media only screen and (max-width:54em) -{ - body#Home #content > .intro > div > div - { - display: block; - width: auto; + overflow: hidden; + text-align: center; + font-size: 1em; } - body#Home #content > .intro > div > div > * - { + img#mobile-hamburger { + position: absolute; + left: 0; + top: 0; + width: 3.2em; + height: 3.2em; + line-height: 3.3em; + text-align: center; display: block; + cursor: pointer; } - body#Home #content > .intro .pitch - { - max-width: 21em; - width: auto; + img#mobile-hamburger:hover { + background: #444; /* menu_active_bg */ } - body#Home #content > .intro #your-code-here - { - padding: 0; - margin: auto; - margin-top: 2em; + div#header { + position: static; + margin: 0 3.2em; /* = #mobile-hamburger's width */ } - body#Home #news - { + div#header a.logo { display: none; } - body#Home .more .boxes, body#Home .more .whyd - { - margin-right: 0; - padding-right: 0; + span#d-language-mobilehelper { + display: inline-block; + vertical-align: middle; + line-height: 1.0; } - #top > .helper - { + div#header a#d-language { + position: static; + display: table-cell; + vertical-align: middle; + color: white; + text-align: center; + height: 3.2em; padding: 0; + line-height: 1.2em; + background: url(../images/dlogo.png) left no-repeat; + background-size: 50px auto; + padding-left: 60px; + /* + = 50px [background image width] + + 10px [some space between image and text] + */ } - /* lay out navigation vertically */ - - #top #cssmenu, #top #search-box - { - display: block; - } - - #top .logo - { - width: auto; - } - - #top .logo > a - { - background: transparent; /* override :hover background change */ - margin-left: 1em; - } - - #top #cssmenu, #top .search-container - { - display: none; - } - - #top .expand-container.open #cssmenu, - #top .expand-container .search-container - { - display: block; - } + /* Search */ - #top #cssmenu - { - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - border-top: 1px solid #943029; - clear: both; - } - #top #cssmenu > ul + div#search-box { - border-bottom: 1px solid #943029; - border-top: 1px solid rgba(255, 255, 255, 0.1); + position: static; + text-align: center; + overflow: hidden; + margin-top: 1em; + + -moz-transition: height 0.5s; + -o-transition: left 0.5s; + -webkit-transition: height 0.5s; + transition: height 0.5s; } - #top .search-container - { - padding: 0.6em 1em; - width: auto; + div#search-query { + width: 40%; } - #top .search-container.expand-container .expand-toggle - { - display: none; - } + /* Navigation */ - #top .expand-container > #search-box - { - border: 0; + div#navigation { display: block; + position: absolute; + top: 0; + left: -20em; + min-height: 100%; padding: 0; - position: static; - } - - #top .expand-container .search-container - { - display: none; - } - - #top .expand-container.open .search-container - { - display: block; - } - - #top #search-box form - { - display: table; - width: 100%; + margin: 0; + -moz-box-shadow: 10px 0px 20px black; + -webkit-box-shadow: 10px 0px 20px black; + box-shadow: 10px 0px 20px black; + z-index: 10001; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + -webkit-transition: left 0.5s; + transition: left 0.5s; } - #top #search-query, #top #search-dropdown, #top #search-submit - { - display: table-cell; + div#navigation.open{ + left: 0; } - #top #search-query - { - width: auto; + div#navigation-cancel { + position: fixed; + left: 0; top: 0; right: 0; bottom: 0; + background-color: rgba(255,255,255,0.5); + z-index: 10000; } - #top #search-dropdown - { - width: 0; /* shrink to content size */ - } + /* Content */ - #top #cssmenu > ul > li - { - float: none; + div#content { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + margin-left: 0; + margin-right: 0 !important; /* override inline style! */ } - #top #cssmenu > ul > li.expand-container.open > ul - { - border: none; - - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; - - position: static; + body::before { /* Disable pseudo-padding. */ + display: none; } - #top #cssmenu > ul > li.expand-container.open > ul > li > a - { - padding-left: 2em; + pre { + font-size: 1em; } - /* menu button */ - - #top a.hamburger - { - display: inline; - float: right; - font-size: 2em; - height: 1em; - line-height: 1; - padding: 0.15em 1em; - } - #top a.hamburger span - { + img#github-ribbon { display: none; } - #top a.hamburger::after - { - content: "\f0c9"; /* bars */ - font-family: FontAwesome; - } -} - -/* Narrow layout stage 3: no more two column boxes */ -@media only screen and (max-width: 40em) -{ - .boxes .row, .boxes .row .item - { - display: block; - padding: 0; - width: auto; - } - body#Home #content > .intro #your-code-here - { - /* change width to max-width */ - width: auto; - max-width: 32em; + body#Downloads div#tools { + padding-right: 0; } } diff --git a/ctarguments.dd b/ctarguments.dd index 9a30d4be7a..cff6206cc0 100644 --- a/ctarguments.dd +++ b/ctarguments.dd @@ -217,4 +217,3 @@ $(H3 Homogenous lists) Macros: TITLE=Compile-time Argument Lists - SUBNAV=$(SUBNAV_ARTICLES) diff --git a/ctod.dd b/ctod.dd index 3589b69abe..8c0d7ee1e2 100644 --- a/ctod.dd +++ b/ctod.dd @@ -1597,4 +1597,3 @@ int main() Macros: TITLE=Programming in D for C Programmers WIKI=ctod - SUBNAV=$(SUBNAV_ARTICLES) diff --git a/d-array-article.dd b/d-array-article.dd index 98621e37e8..b89fd088f7 100644 --- a/d-array-article.dd +++ b/d-array-article.dd @@ -247,5 +247,4 @@ Macros: STDREF = $(D $2) OBJREF = $(D $2) WIKI = - SUBNAV=$(SUBNAV_ARTICLES) _= diff --git a/d-floating-point.dd b/d-floating-point.dd index 3f08441ded..43440d595d 100644 --- a/d-floating-point.dd +++ b/d-floating-point.dd @@ -348,4 +348,3 @@ Macros: HALF = ½ TITLE=Real Close to the Machine: Floating Point in D WIKI=FloatingPointInD - SUBNAV=$(SUBNAV_ARTICLES) diff --git a/dlang.org.ddoc b/dlang.org.ddoc index 2b65f1e7a4..bfd4baa324 100644 --- a/dlang.org.ddoc +++ b/dlang.org.ddoc @@ -66,30 +66,30 @@ $(T title, $(FULL_TITLE)) $(COMMON_HEADERS_DLANG) + $(EXTRA_HEADERS) $(SCRIPT document.body.className += ' have-javascript') -$(DIVID top, $(DIVC helper, $(DIVC helper expand-container, - $(DIVC logo, ) - Menu +$(DIVID top, + $(DIVID header, + + + D Programming Language + ) +) +$(DIVID navigation, + $(SEARCH_BOX) $(NAVIGATION) - $(DIVC search-container expand-container, - Search - $(SEARCH_BOX) - ) -))) +) $(LAYOUT_PREFIX) -$(DIVC container, - $(SUBNAV) - $(DIVCID $(HYPHENATE), content, - $(PAGE_TOOLS) - $(LAYOUT_TITLE) - $(BODY_PREFIX) - $(BODY) - ) +$(DIVCID $(HYPHENATE), content, + $(PAGE_TOOLS) + $(LAYOUT_TITLE) + $(BODY_PREFIX) + $(BODY) ) $(FOOTER) $(COMMON_SCRIPTS) @@ -125,7 +125,7 @@ DDOC_PARAMS = $(DDOCKEYVAL Parameters,
#{info.mod.qualifiedName}.#{title[0 .. $-24]}
#{title[$-24 ..$]}
- - else if (hidx > 0 && !title.startsWith("Module ") && node)
- h1 #{title[0 .. hidx]} #{node.parent.qualifiedName}.#{node.name}
- - else if (hidx > 0 && title.startsWith("Module ") && info.mod)
- h1 Module #{info.mod.qualifiedName}
- - else
- h1= title
- block body
+ - auto hidx = std.string.lastIndexOf(title, ' ');
+ - auto node = info.docGroups.length ? info.docGroups[0].members[0] : null;
+ - if (title.endsWith(" - multiple declarations") && node)
+ h1 #{info.mod.qualifiedName}.#{title[0 .. $-24]}
#{title[$-24 ..$]}
+ - else if (hidx > 0 && !title.startsWith("Module ") && node)
+ h1 #{title[0 .. hidx]} #{node.parent.qualifiedName}.#{node.name}
+ - else if (hidx > 0 && title.startsWith("Module ") && info.mod)
+ h1 Module #{info.mod.qualifiedName}
+ - else
+ h1= title
+ block body
- |
- #quickindex.quickindex
+ |
+ #quickindex.quickindex
#copyright
block copyright
diff --git a/exception-safe.dd b/exception-safe.dd
index 4f70b5a7f7..5d81f19f05 100644
--- a/exception-safe.dd
+++ b/exception-safe.dd
@@ -441,4 +441,4 @@ $(LINK2 http://www.amazon.com/exec/obidos/ASIN/0321334876/classicempire,
Macros:
TITLE=Exception Safety
WIKI=ExceptionSafe
- SUBNAV=$(SUBNAV_ARTICLES)
+
diff --git a/faq.dd b/faq.dd
index ff475fd6c7..7a214d1586 100644
--- a/faq.dd
+++ b/faq.dd
@@ -934,4 +934,3 @@ Macros:
WIKI=FAQ
ITEMR=$(LI $(RELATIVE_LINK2 $1, $+))
ITEM=