This is an automated email from the ASF dual-hosted git repository. dashorst pushed a commit to branch user-guide-design-10.x in repository https://gitbox.apache.org/repos/asf/wicket.git
commit c39b6ff8daf0b6d1d53600b93295e89938b60a0a Author: Martijn Dashorst <[email protected]> AuthorDate: Fri Nov 13 00:25:17 2026 +0100 Style the reference guide like wicket.apache.org The guide used a 2017 copy of the minified default Asciidoctor stylesheet, changed only for a sans-serif body (WICKET-6372), and it had no syntax highlighting at all: the pom passed <sourceHighlighter>, which asciidoctor-maven-plugin 2.x does not know and silently ignores, so every listing rendered as plain text. The page also loaded Font Awesome from cdnjs for the admonition icons. The guide now keeps the plugin's default stylesheet and adds a small override through docinfo, in the design of the project site: its colour tokens, its self-hosted Alegreya and JetBrains Mono fonts (SIL OFL, licences alongside) and its Rouge colours. Rouge is set through the source-highlighter attribute. A masthead links to the site, the Javadoc of the line and the other versions; the table of contents follows the section being read and opens only that chapter; listings get a language label and a copy button, and wicket:id and the wicket: tags are marked in HTML samples; admonitions become asides; a dark mode follows the system setting. Webfonts and the icon font are off, so the page makes no external requests. The body text moves back to a serif, as on the site, which reverses WICKET-6372. The PDF keeps its font icons and is otherwise unchanged. The design tokens are copied from the site's _sass/ribbon/_base.scss and have to be kept in step with it by hand. LICENSE lists the fonts under the SIL Open Font License next to the fonts of the examples, and .rat-excludes covers their licence texts. The Asciidoctor (MIT) entry and licenses/LICENSE-asciidoctor.txt go, as the copied stylesheet they covered is gone from the source tree. The page is usable without a mouse and with a screen reader: a skip link comes first, #content and the table of contents are landmarks, the logo link keeps its name on phones, a chapter's sections also open while focus is inside it, the current entry carries aria-current, copy buttons are named after their language and "Copied" is announced through one status region. Diagrams get a white background in dark mode so their dark lines stay visible. The version line in the title, the masthead and the Javadoc link come from the project version through build-helper's parse-version goal, so nothing has to be changed by hand at a major release or on a cherry-pick. GitHub issue #1844 GitHub issue #1931 Generated-by: Claude Code (Claude Opus 5.5) (cherry picked from commit 745ae018ec05cadf3acc5a1110a6c1fbb9e3677d) --- .rat-excludes | 2 +- LICENSE | 10 +- licenses/LICENSE-asciidoctor.txt | 22 -- wicket-user-guide/pom.xml | 20 +- wicket-user-guide/src/main/asciidoc/css/style.css | 408 --------------------- wicket-user-guide/src/main/asciidoc/css/wicket.css | 404 ++++++++++++++++++++ .../src/main/asciidoc/docinfo-footer.html | 17 + .../src/main/asciidoc/docinfo-header.html | 27 ++ wicket-user-guide/src/main/asciidoc/docinfo.html | 21 ++ .../main/asciidoc/fonts/LICENSE-alegreya-sans.txt | 93 +++++ .../main/asciidoc/fonts/LICENSE-alegreya-sc.txt | 93 +++++ .../src/main/asciidoc/fonts/LICENSE-alegreya.txt | 93 +++++ .../main/asciidoc/fonts/LICENSE-jetbrains-mono.txt | 93 +++++ .../asciidoc/fonts/alegreya-latin-400-italic.woff2 | Bin 0 -> 23156 bytes .../asciidoc/fonts/alegreya-latin-400-normal.woff2 | Bin 0 -> 22884 bytes .../asciidoc/fonts/alegreya-latin-700-normal.woff2 | Bin 0 -> 24352 bytes .../fonts/alegreya-sans-latin-400-normal.woff2 | Bin 0 -> 23708 bytes .../fonts/alegreya-sans-latin-500-normal.woff2 | Bin 0 -> 23928 bytes .../fonts/alegreya-sans-latin-700-normal.woff2 | Bin 0 -> 23976 bytes .../fonts/alegreya-sc-latin-500-normal.woff2 | Bin 0 -> 30880 bytes .../fonts/jetbrains-mono-latin-400-normal.woff2 | Bin 0 -> 21168 bytes .../src/main/asciidoc/img/wicket-mark.svg | 22 ++ wicket-user-guide/src/main/asciidoc/js/guide.js | 180 +++++++++ wicket-user-guide/src/main/asciidoc/single.adoc | 4 +- 24 files changed, 1068 insertions(+), 441 deletions(-) diff --git a/.rat-excludes b/.rat-excludes index 570c77432d..0203294dd4 100644 --- a/.rat-excludes +++ b/.rat-excludes @@ -27,7 +27,7 @@ wicket-examples/src/main/webapp/js-test/lib/jquery.js wicket-examples/src/main/webapp/js-test/lib/qunit.* wicket-examples/src/main/java/org/apache/wicket/examples/preview/behaviour.js wicket-examples/src/main/resources/org/apache/wicket/examples/fonts/** -wicket-user-guide/src/main/asciidoc/css/style.css +wicket-user-guide/src/main/asciidoc/fonts/** # Generated release notes CHANGELOG-* diff --git a/LICENSE b/LICENSE index 48c326e6d2..64f76ed202 100644 --- a/LICENSE +++ b/LICENSE @@ -255,12 +255,6 @@ Prototype JavaScript framework 1.4.0 Copyright (c) 2005 Sam Stephenson licenses/LICENSE-prototype.txt -Asciidoctor default stylesheet - wicket-user-guide/src/main/asciidoc/css/style.css - Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the - individual contributors to Asciidoctor - licenses/LICENSE-asciidoctor.txt - -------------------------------------------------------------------------------- BSD License -------------------------------------------------------------------------------- @@ -309,6 +303,10 @@ League Gothic, Source Code Pro and Source Sans Pro wicket-examples/src/main/resources/org/apache/wicket/examples/fonts/ The license text is in each font's directory. +Alegreya, Alegreya Sans, Alegreya SC and JetBrains Mono + wicket-user-guide/src/main/asciidoc/fonts/ + The license texts are in the same directory. + -------------------------------------------------------------------------------- Other permissive terms -------------------------------------------------------------------------------- diff --git a/licenses/LICENSE-asciidoctor.txt b/licenses/LICENSE-asciidoctor.txt deleted file mode 100644 index 2a56c91b13..0000000000 --- a/licenses/LICENSE-asciidoctor.txt +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the -individual contributors to Asciidoctor. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/wicket-user-guide/pom.xml b/wicket-user-guide/pom.xml index 72d3ef6d74..b68ae2d5ec 100644 --- a/wicket-user-guide/pom.xml +++ b/wicket-user-guide/pom.xml @@ -101,15 +101,18 @@ <attributes> <gemPath>${project.build.directory}/gems-provided</gemPath> <allow-uri-read>allow-uri-read</allow-uri-read> - <stylesheet>css/style.css</stylesheet> <linkcss>true</linkcss> + <source-highlighter>rouge</source-highlighter> + <rouge-css>class</rouge-css> + <webfonts>false</webfonts> + <wicket_line>${parsedVersion.majorVersion}.x</wicket_line> + <wicket_line_major>${parsedVersion.majorVersion}</wicket_line_major> </attributes> <preserveDirectories>true</preserveDirectories> <requires> <require>asciidoctor-diagram</require> </requires> <sourceDocumentName>single.adoc</sourceDocumentName> - <sourceHighlighter>coderay</sourceHighlighter> </configuration> <executions> <execution> @@ -139,6 +142,7 @@ <configuration> <backend>pdf</backend> <attributes> + <icons>font</icons> <pagenums /> <idprefix /> <idseparator>-</idseparator> @@ -200,6 +204,18 @@ <groupId>org.asciidoctor</groupId> <artifactId>asciidoctor-maven-plugin</artifactId> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>parse-version</id> + <goals> + <goal>parse-version</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> </profile> diff --git a/wicket-user-guide/src/main/asciidoc/css/style.css b/wicket-user-guide/src/main/asciidoc/css/style.css deleted file mode 100644 index 3b11c9b671..0000000000 --- a/wicket-user-guide/src/main/asciidoc/css/style.css +++ /dev/null @@ -1,408 +0,0 @@ -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ -/* Remove comment around @import statement below when using as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/ -article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} -audio,canvas,video{display:inline-block} -audio:not([controls]){display:none;height:0} -[hidden],template{display:none} -script{display:none!important} -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} -a{background:transparent} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -dfn{font-style:italic} -hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} -mark{background:#ff0;color:#000} -code,kbd,pre,samp{font-family:monospace;font-size:1em} -pre{white-space:pre-wrap} -q{quotes:"\201C" "\201D" "\2018" "\2019"} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-.5em} -sub{bottom:-.25em} -img{border:0} -svg:not(:root){overflow:hidden} -figure{margin:0} -fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0} -button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} -button,input{line-height:normal} -button,select{text-transform:none} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} -button[disabled],html input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} -*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} -html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:sans-serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased} -a:hover{cursor:pointer} -img,object,embed{max-width:100%;height:auto} -object,embed{height:100%} -img{-ms-interpolation-mode:bicubic} -.left{float:left!important} -.right{float:right!important} -.text-left{text-align:left!important} -.text-right{text-align:right!important} -.text-center{text-align:center!important} -.text-justify{text-align:justify!important} -.hide{display:none} -img,object,svg{display:inline-block;vertical-align:middle} -textarea{height:auto;min-height:50px} -select{width:100%} -.center{margin-left:auto;margin-right:auto} -.spread{width:100%} -p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} -.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} -a{color:#2156a5;text-decoration:underline;line-height:inherit} -a:hover,a:focus{color:#1d4b8f} -a img{border:none} -p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} -p aside{font-size:.875em;line-height:1.35;font-style:italic} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} -h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} -h1{font-size:2.125em} -h2{font-size:1.6875em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} -h4,h5{font-size:1.125em} -h6{font-size:1em} -hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} -em,i{font-style:italic;line-height:inherit} -strong,b{font-weight:bold;line-height:inherit} -small{font-size:60%;line-height:inherit} -code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} -ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} -ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} -ul.circle{list-style-type:circle} -ul.disc{list-style-type:disc} -ul.no-bullet{list-style:none} -ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} -dl dt{margin-bottom:.3125em;font-weight:bold} -dl dd{margin-bottom:1.25em} -abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} -abbr{text-transform:none} -blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} -blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} -blockquote cite:before{content:"\2014 \0020"} -blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} -blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} -@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} - h1{font-size:2.75em} - h2{font-size:2.3125em} - h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} - h4{font-size:1.4375em}} -table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} -table thead,table tfoot{background:#f7f8f7;font-weight:bold} -table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} -table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} -table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} -h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} -.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} -.clearfix:after,.float-group:after{clear:both} -*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word} -*:not(pre)>code.nobreak{word-wrap:normal} -*:not(pre)>code.nowrap{white-space:nowrap} -pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} -em em{font-style:normal} -strong strong{font-weight:400} -.keyseq{color:rgba(51,51,51,.8)} -kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap} -.keyseq kbd:first-child{margin-left:0} -.keyseq kbd:last-child{margin-right:0} -.menuseq,.menu{color:rgba(0,0,0,.8)} -b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} -b.button:before{content:"[";padding:0 3px 0 2px} -b.button:after{content:"]";padding:0 2px 0 3px} -p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} -#header:after,#content:after,#footnotes:after,#footer:after{clear:both} -#content{margin-top:1.25em} -#content:before{content:none} -#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} -#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} -#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} -#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} -#header .details span:first-child{margin-left:-.125em} -#header .details span.email a{color:rgba(0,0,0,.85)} -#header .details br{display:none} -#header .details br+span:before{content:"\00a0\2013\00a0"} -#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} -#header .details br+span#revremark:before{content:"\00a0|\00a0"} -#header #revnumber{text-transform:capitalize} -#header #revnumber:after{content:"\00a0"} -#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} -#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} -#toc>ul{margin-left:.125em} -#toc ul.sectlevel0>li>a{font-style:italic} -#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} -#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} -#toc li{line-height:1.3334;margin-top:.3334em} -#toc a{text-decoration:none} -#toc a:active{text-decoration:underline} -#toctitle{color:#7a2518;font-size:1.2em} -@media only screen and (min-width:768px){#toctitle{font-size:1.375em} - body.toc2{padding-left:15em;padding-right:0} - #toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} - #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em} - #toc.toc2>ul{font-size:.9em;margin-bottom:0} - #toc.toc2 ul ul{margin-left:0;padding-left:1em} - #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} - body.toc2.toc-right{padding-left:0;padding-right:15em} - body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}} -@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} - #toc.toc2{width:20em} - #toc.toc2 #toctitle{font-size:1.375em} - #toc.toc2>ul{font-size:.95em} - #toc.toc2 ul ul{padding-left:1.25em} - body.toc2.toc-right{padding-left:0;padding-right:20em}} -#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -#content #toc>:first-child{margin-top:0} -#content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} -#footer-text{color:rgba(255,255,255,.8);line-height:1.44} -.sect1{padding-bottom:.625em} -@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}} -.sect1+.sect1{border-top:1px solid #efefed} -#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} -#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} -#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} -#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} -#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} -.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} -.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} -table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} -.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} -table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} -.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} -.admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:none} -.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} -.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} -.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} -.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} -.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} -.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} -.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} -.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} -@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}} -@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}} -.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} -.listingblock pre.highlightjs{padding:0} -.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} -.listingblock pre.prettyprint{border-width:0} -.listingblock>.content{position:relative} -.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} -.listingblock:hover code[data-lang]:before{display:block} -.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} -.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} -table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} -table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45} -table.pyhltable td.code{padding-left:.75em;padding-right:0} -pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} -pre.pygments .lineno{display:inline-block;margin-right:.25em} -table.pyhltable .linenodiv{background:none!important;padding-right:0!important} -.quoteblock{margin:0 1em 1.25em 1.5em;display:table} -.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} -.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} -.quoteblock blockquote{margin:0;padding:0;border:0} -.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} -.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} -.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} -.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} -.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} -.quoteblock .quoteblock blockquote:before{display:none} -.verseblock{margin:0 1em 1.25em 1em} -.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} -.verseblock pre strong{font-weight:400} -.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} -.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} -.quoteblock .attribution br,.verseblock .attribution br{display:none} -.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)} -.quoteblock.abstract{margin:0 0 1.25em 0;display:block} -.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} -.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} -table.tableblock{max-width:100%;border-collapse:separate} -table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} -table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} -table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} -table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} -table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} -table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} -table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} -table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} -table.frame-all{border-width:1px} -table.frame-sides{border-width:0 1px} -table.frame-topbot{border-width:1px 0} -th.halign-left,td.halign-left{text-align:left} -th.halign-right,td.halign-right{text-align:right} -th.halign-center,td.halign-center{text-align:center} -th.valign-top,td.valign-top{vertical-align:top} -th.valign-bottom,td.valign-bottom{vertical-align:bottom} -th.valign-middle,td.valign-middle{vertical-align:middle} -table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} -tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} -p.tableblock>code:only-child{background:none;padding:0} -p.tableblock{font-size:1em} -td>div.verse{white-space:pre} -ol{margin-left:1.75em} -ul li ol{margin-left:1.5em} -dl dd{margin-left:1.125em} -dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} -ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} -ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} -ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} -ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} -ul.inline>li>*{display:block} -.unstyled dl dt{font-weight:400;font-style:normal} -ol.arabic{list-style-type:decimal} -ol.decimal{list-style-type:decimal-leading-zero} -ol.loweralpha{list-style-type:lower-alpha} -ol.upperalpha{list-style-type:upper-alpha} -ol.lowerroman{list-style-type:lower-roman} -ol.upperroman{list-style-type:upper-roman} -ol.lowergreek{list-style-type:lower-greek} -.hdlist>table,.colist>table{border:0;background:none} -.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} -td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em} -td.hdlist1{font-weight:bold;padding-bottom:1.25em} -.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} -.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} -.colist>table tr>td:last-of-type{padding:.25em 0} -.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} -.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} -.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} -.imageblock>.title{margin-bottom:0} -.imageblock.thumb,.imageblock.th{border-width:6px} -.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} -.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} -.image.left{margin-right:.625em} -.image.right{margin-left:.625em} -a.image{text-decoration:none;display:inline-block} -a.image object{pointer-events:none} -sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super} -sup.footnote a,sup.footnoteref a{text-decoration:none} -sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline} -#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} -#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} -#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em} -#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} -#footnotes .footnote:last-of-type{margin-bottom:0} -#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} -.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} -.gist .file-data>table td.line-data{width:99%} -div.unbreakable{page-break-inside:avoid} -.big{font-size:larger} -.small{font-size:smaller} -.underline{text-decoration:underline} -.overline{text-decoration:overline} -.line-through{text-decoration:line-through} -.aqua{color:#00bfbf} -.aqua-background{background-color:#00fafa} -.black{color:#000} -.black-background{background-color:#000} -.blue{color:#0000bf} -.blue-background{background-color:#0000fa} -.fuchsia{color:#bf00bf} -.fuchsia-background{background-color:#fa00fa} -.gray{color:#606060} -.gray-background{background-color:#7d7d7d} -.green{color:#006000} -.green-background{background-color:#007d00} -.lime{color:#00bf00} -.lime-background{background-color:#00fa00} -.maroon{color:#600000} -.maroon-background{background-color:#7d0000} -.navy{color:#000060} -.navy-background{background-color:#00007d} -.olive{color:#606000} -.olive-background{background-color:#7d7d00} -.purple{color:#600060} -.purple-background{background-color:#7d007d} -.red{color:#bf0000} -.red-background{background-color:#fa0000} -.silver{color:#909090} -.silver-background{background-color:#bcbcbc} -.teal{color:#006060} -.teal-background{background-color:#007d7d} -.white{color:#bfbfbf} -.white-background{background-color:#fafafa} -.yellow{color:#bfbf00} -.yellow-background{background-color:#fafa00} -span.icon>.fa{cursor:default} -.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} -.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} -.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} -.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} -.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} -.conum[data-value] *{color:#fff!important} -.conum[data-value]+b{display:none} -.conum[data-value]:after{content:attr(data-value)} -pre .conum[data-value]{position:relative;top:-.125em} -b.conum *{color:inherit!important} -.conum:not([data-value]):empty{display:none} -dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility} -h1,h2,p,td.content,span.alt{letter-spacing:-.01em} -p strong,td.content strong,div.footnote strong{letter-spacing:-.005em} -p,blockquote,dt,td.content,span.alt{font-size:1.0625rem} -p{margin-bottom:1.25rem} -.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} -.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} -.print-only{display:none!important} -@media print{@page{margin:1.25cm .75cm} - *{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} - a{color:inherit!important;text-decoration:underline!important} - a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} - a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} - abbr[title]:after{content:" (" attr(title) ")"} - pre,blockquote,tr,img,object,svg{page-break-inside:avoid} - thead{display:table-header-group} - svg{max-width:100%} - p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} - h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} - #toc,.sidebarblock,.exampleblock>.content{background:none!important} - #toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} - .sect1{padding-bottom:0!important} - .sect1+.sect1{border:0!important} - #header>h1:first-child{margin-top:1.25rem} - body.book #header{text-align:center} - body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} - body.book #header .details{border:0!important;display:block;padding:0!important} - body.book #header .details span:first-child{margin-left:0!important} - body.book #header .details br{display:block} - body.book #header .details br+span:before{content:none!important} - body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} - body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} - .listingblock code[data-lang]:before{display:block} - #footer{background:none!important;padding:0 .9375em} - #footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} - .hide-on-print{display:none!important} - .print-only{display:block!important} - .hide-for-print{display:none!important} - .show-for-print{display:inherit!important}} diff --git a/wicket-user-guide/src/main/asciidoc/css/wicket.css b/wicket-user-guide/src/main/asciidoc/css/wicket.css new file mode 100644 index 0000000000..039031f5bc --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/css/wicket.css @@ -0,0 +1,404 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + The reference guide in the design of wicket.apache.org: cool paper, ink and one orange ribbon, + set in Alegreya with JetBrains Mono for code. Loaded after the default Asciidoctor stylesheet + and overrides only what makes the guide Wicket's. The tokens are those of the site's + _sass/ribbon/_base.scss. +*/ + +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-italic.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sc-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); } + +:root { + --paper: #F6F8F7; + --paper-tint: #E9F0ED; + --ink: #14241F; + --ink-soft: #4A5E57; + --rule: #CFDAD5; + --code-bg: #E4ECE8; + --cloth: #103C35; + --muted: #A8C7BD; + --ribbon: #EE7F2D; + --ribbon-text: #F39A55; + --ribbon-deep: #9A430A; + --ribbon-wash: rgba(238, 127, 45, .16); + --on-ribbon: #14241F; + --on-cloth: #F6F8F7; + --code-green: #1C5E43; + --code-tag: #0F4A40; + --code-op: #33473F; + + --serif: "Alegreya", Georgia, serif; + --sc: "Alegreya SC", "Alegreya", Georgia, serif; + --sans: "Alegreya Sans", "Alegreya", sans-serif; + --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; + + --measure: 68ch; + --column: 60rem; + --mast-h: 60px; + --toc-w: 17rem; + --rw: 5px; + + color-scheme: light dark; +} + +@media (prefers-color-scheme: dark) { + :root { + --paper: #0E1C19; + --paper-tint: #132622; + --ink: #E2EBE7; + --ink-soft: #A4B8B0; + --rule: #2A403A; + --code-bg: #182E29; + --ribbon-deep: #F39A55; + --ribbon-wash: rgba(238, 127, 45, .13); + --code-green: #9FD3AE; + --code-tag: #86CBBE; + --code-op: #B9C9C2; + } +} + +@media (min-width: 1280px) { :root { --toc-w: 19rem; } } + +/* ---------------------------------------------------------------- ground, type, links */ + +html { background: var(--paper); scroll-padding-top: calc(var(--mast-h) + 16px); } +body { + background: var(--paper); color: var(--ink); + font: 400 1.1875rem/1.6 var(--serif); + font-variant-numeric: lining-nums; +} +::selection { background: var(--ribbon); color: var(--on-ribbon); } + +a, a:hover, a:focus { + color: inherit; + text-decoration: underline; text-decoration-color: var(--ribbon-deep); + text-decoration-thickness: 1.5px; text-underline-offset: .22em; +} +a:hover { text-decoration-thickness: 3px; } +a:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 3px; border-radius: 2px; } + +p, td.content, .paragraph, .ulist, .olist, .dlist, table tr th, table tr td, tbody tr th, tbody tr th p, +.exampleblock > .content, .verseblock pre, .literalblock.output pre { color: var(--ink); } +#content p, #content .ulist, #content .olist, #content .dlist, +#preamble, .quoteblock, .verseblock, .sidebarblock { max-width: var(--measure); } +.paragraph, .ulist, .olist, .dlist { font-family: var(--serif); } +#content p { font-size: 1em; line-height: 1.6; text-rendering: optimizeLegibility; } +li::marker { color: var(--ribbon-deep); } +.ulist li > p, .olist li > p { margin-bottom: .3em; } +.dlist dt { font-weight: 700; color: var(--ink); } + +h1, h2, h3, h4, h5, h6, #toctitle { + font-family: var(--serif); font-weight: 700; color: var(--ink); + letter-spacing: -.015em; word-spacing: normal; +} +h5, h6 { font: 500 1.1rem/1.25 var(--sc); letter-spacing: .03em; color: var(--ink-soft); } + +/* The anchor Asciidoctor puts on every section title links the title text itself. */ +h2 > a.link, h3 > a.link, h4 > a.link, h5 > a.link { color: inherit; text-decoration: none; } +h2 > a.link:hover, h3 > a.link:hover, h4 > a.link:hover { text-decoration: underline; text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 2px; } + +/* ---------------------------------------------------------------- masthead */ + +.mast { + position: sticky; top: 0; z-index: 20; + display: flex; align-items: center; gap: 18px; + height: var(--mast-h); padding: 0 18px; + background: var(--paper); border-bottom: 1px solid var(--rule); + font: 500 1.0625rem/1.2 var(--sans); +} +.skip-link { + position: absolute; left: 16px; top: -100px; z-index: 100; padding: 8px 14px; + background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; text-decoration: none; +} +.skip-link:focus { top: 8px; color: var(--on-ribbon); } +.visually-hidden { + position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; + clip: rect(0 0 0 0); white-space: nowrap; border: 0; +} +.mast-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; } +.mast-brand:hover { text-decoration: none; } +.mast-brand img { width: 30px; height: 30px; display: block; } +.mast-brand span { font: 700 1.3rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; } +.mast-plate { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink-soft); white-space: nowrap; } +.mast-version { + padding: 1px 8px 2px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; +} +.mast-nav { display: flex; gap: 18px; margin-left: auto; } +.mast-nav a { color: var(--ink); text-decoration-color: transparent; white-space: nowrap; } +.mast-nav a:hover { text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 1.5px; } +@media (max-width: 640px) { + .mast { gap: 12px; } + .mast-brand span, .mast-plate-label, .mast-nav a.mast-optional { display: none; } +} +@media (pointer: coarse) { .mast-nav a { display: inline-flex; align-items: center; min-height: 44px; } } + +/* ---------------------------------------------------------------- title block */ + +#header, #content, #footnotes { max-width: var(--column); padding-left: 36px; padding-right: 36px; } +#header > h1:first-child { + margin: 2.75rem 0 .5rem; color: var(--ink); + font: 700 clamp(2.4rem, 4.4vw, 3.6rem)/1.02 var(--serif); letter-spacing: -.02em; +} +#header > h1:first-child + #toc, #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border: 0; } +#header .details { + border: 0; border-bottom: 2px solid var(--ink); padding: 0 0 14px; + font: 500 1.05rem/1.3 var(--sc); letter-spacing: .03em; color: var(--ink-soft); +} + +/* ---------------------------------------------------------------- the table of contents on the ribbon */ + +#toc.toc2, #toc { + background: var(--paper); border: 0; + font: 400 1.0625rem/1.3 var(--sans); +} +#toctitle, #toc.toc2 #toctitle { + position: relative; margin: 0; padding: 0 0 10px 24px; + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); +} +#toctitle::before { content: ""; position: absolute; left: 0; top: -24px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); } +#toc ul.sectlevel0 > li > a { font-style: normal; } +#toc li { position: relative; margin: 0; padding: 0 0 0 22px; line-height: 1.3; } +#toc li::before { + content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 17px; + border-left: var(--rw) solid var(--ribbon); border-bottom: var(--rw) solid var(--ribbon); border-bottom-left-radius: 2px; +} +#toc li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc li li { padding-left: 18px; } +#toc li li::before { width: 11px; height: 15px; border-width: 0 0 3px 3px; } +#toc li li:not(:last-child)::after { top: 12px; border-left-width: 3px; } +#toc a { + display: inline-block; margin: 3px 0; padding: 3px 7px 4px; border-radius: 3px; + color: var(--ink-soft); text-decoration: none; transition: background-color .15s, color .15s; +} +#toc li li a { margin: 1px 0; padding-block: 2px 3px; font-size: .95rem; } +#toc a:hover { color: var(--ink); background: var(--ribbon-wash); text-decoration: none; } +#toc a.is-current { color: var(--on-ribbon); background: var(--ribbon); } +#toc a .toc-num { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; margin-right: .35em; } + +/* With the script, a chapter shows its sections only while it is read. */ +.js-toc #toc li > ul { display: none; } +.js-toc #toc li.is-open > ul, .js-toc #toc li:focus-within > ul { display: block; } + +@media screen and (min-width: 768px) { + body.toc2 { padding-left: 0; } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes, body.toc2 > #footer { + margin-left: var(--toc-w); + } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { margin-right: auto; } + #toc.toc2 { + top: var(--mast-h); width: var(--toc-w); height: calc(100% - var(--mast-h)); + padding: 24px 16px 32px 18px; border-right: 1px solid var(--rule); + } + #toc.toc2 > ul { font-size: 1rem; } + #toc.toc2 ul ul { padding-left: 0; } + @media (min-width: 1500px) { + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { + margin-left: max(var(--toc-w), calc((100vw - var(--column)) / 2)); + } + } +} +@media screen and (max-width: 767px) { + #toc.toc2 { padding: 24px 18px 8px; margin: 0 -36px; } + #header, #content, #footnotes { padding-left: 18px; padding-right: 18px; } +} + +/* ---------------------------------------------------------------- sections */ + +#content .sect1 { padding-bottom: 1.5rem; } +#content .sect1 + .sect1 { border: 0; } +#content > .sect1:first-child > h2 { border-top: 0; padding-top: 0; margin-top: 2.5rem; } +.sect1 > h2 { + margin: 3.5rem 0 1rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); + font: 700 clamp(1.9rem, 2.8vw, 2.4rem)/1.08 var(--serif); +} +.sect2 > h3 { margin: 2.75rem 0 .6rem; font: 700 1.6rem/1.15 var(--serif); } +.sect3 > h4 { margin: 2rem 0 .5rem; font: 700 1.3rem/1.2 var(--serif); } +.sect4 > h5 { margin: 1.5rem 0 .4rem; } + +/* ---------------------------------------------------------------- inline code */ + +:not(pre):not([class^=L]) > code { + padding: .08em .32em; background: var(--code-bg); border-radius: 2px; + color: var(--ink); font: 400 .82em/1.4 var(--mono); letter-spacing: 0; word-spacing: 0; + font-variant-ligatures: none; +} +a > code { text-decoration: inherit; } + +/* ---------------------------------------------------------------- code blocks */ + +.listingblock, .literalblock { margin: 1.25rem 0 1.75rem; } +.listingblock > .content, .literalblock > .content { position: relative; } +.listingblock pre, .listingblock pre.highlight, .listingblock pre.rouge, .literalblock pre { + margin: 0; padding: 12px 16px 14px; + background: var(--code-bg); border: 0; border-radius: 0 0 2px 2px; + color: var(--ink); font: 400 .8125rem/1.65 var(--mono); tab-size: 4; + font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; + overflow-x: auto; white-space: pre; word-wrap: normal; +} +.literalblock pre, .listingblock:not(.has-bar) pre { border-radius: 2px; } +.listingblock pre code, .literalblock pre code { font: inherit; padding: 0; background: none; } + +/* The bar the script puts above a listing: its language and a copy button. */ +.code-bar { + display: flex; align-items: center; justify-content: space-between; gap: 12px; + padding: 7px 8px 0 16px; background: var(--code-bg); border-radius: 2px 2px 0 0; +} +.code-lang { font: 500 .95rem/1 var(--sc); letter-spacing: .04em; color: var(--ink-soft); } +.code-copy { + padding: 4px 10px 5px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--paper); color: var(--ink); font: 500 .9rem/1 var(--sans); cursor: pointer; + transition: background-color .15s; +} +.code-copy:hover { background: var(--ribbon); color: var(--on-ribbon); } +.code-copy:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 2px; } + +/* A listing's title is the file it shows. */ +.listingblock > .title, .literalblock > .title { + margin: 0; padding: 0 0 6px; color: var(--ink-soft); + font: italic 400 1.05rem/1.3 var(--serif); +} + +/* Rouge, in the palette of the homepage code: keywords in deep orange, strings and tags in green. */ +pre.rouge .c, pre.rouge .c1, pre.rouge .cm, pre.rouge .cd, pre.rouge .cs, pre.rouge .ch { color: var(--ink-soft); font-style: italic; } +pre.rouge .cp { color: var(--ink-soft); } +pre.rouge .k, pre.rouge .kd, pre.rouge .kn, pre.rouge .kp, pre.rouge .kr, pre.rouge .kv, pre.rouge .kc { color: var(--ribbon-deep); font-weight: 400; } +pre.rouge .kt { color: var(--code-tag); font-weight: 400; } +pre.rouge .o, pre.rouge .ow, pre.rouge .p, pre.rouge .pi { color: var(--code-op); font-weight: 400; } +pre.rouge .s, pre.rouge .s1, pre.rouge .s2, pre.rouge .sa, pre.rouge .sb, pre.rouge .sc, pre.rouge .sd, +pre.rouge .se, pre.rouge .sh, pre.rouge .si, pre.rouge .sx, pre.rouge .sr, pre.rouge .ss, pre.rouge .dl { color: var(--code-green); } +pre.rouge .m, pre.rouge .mb, pre.rouge .mf, pre.rouge .mh, pre.rouge .mi, pre.rouge .mo, pre.rouge .mx, pre.rouge .il { color: var(--code-green); } +pre.rouge .nt { color: var(--code-tag); font-weight: 400; } +pre.rouge .na, pre.rouge .nl { color: var(--ribbon-deep); } +pre.rouge .nc, pre.rouge .nn, pre.rouge .ne, pre.rouge .nf, pre.rouge .fm, pre.rouge .nb, pre.rouge .bp, +pre.rouge .no, pre.rouge .nv, pre.rouge .vc, pre.rouge .vg, pre.rouge .vi, pre.rouge .n { color: var(--ink); font-weight: 400; } +pre.rouge .nd { color: var(--code-tag); } +pre.rouge .ni { color: var(--code-tag); } +pre.rouge .err { color: inherit; background: none; } +pre.rouge .gp { color: var(--ink-soft); user-select: none; } + +/* Where markup binds to Java: wicket:id and the wicket: tags, marked by the script. */ +pre.rouge .wicket-id, pre.rouge .wicket-tag { + border-radius: 2px; box-shadow: 0 0 0 1px var(--ribbon-wash); background: var(--ribbon-wash); +} +pre.rouge .wicket-id { color: var(--ribbon-deep); } + +/* ---------------------------------------------------------------- admonitions: asides on the tint */ + +.admonitionblock { margin: 1.5rem 0 1.75rem; max-width: var(--measure); } +.admonitionblock > table, .admonitionblock > table > tbody, .admonitionblock > table > tbody > tr, +.admonitionblock > table td { display: block; width: auto; border: 0; padding: 0; background: none; } +.admonitionblock > table { + padding: 10px 18px 14px; background: var(--paper-tint); border-top: 1px solid var(--ribbon); +} +.admonitionblock > table td.icon { text-align: left; } +.admonitionblock > table td.icon .title { + margin: 0 0 2px; font: 500 1.05rem/1.3 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); + text-transform: lowercase; +} +.admonitionblock > table td.content { + color: var(--ink); font: 400 1.0625rem/1.55 var(--serif); + padding: 0; border: 0; +} +.admonitionblock td.content > :last-child, .admonitionblock td.content > :last-child > :last-child { margin-bottom: 0; } +.admonitionblock td.content > .title { font: 700 1.1rem/1.3 var(--serif); color: var(--ink); font-style: normal; } +.admonitionblock.warning > table, .admonitionblock.caution > table, .admonitionblock.important > table { + border-top-width: 3px; + box-shadow: inset var(--rw) 0 0 var(--ribbon); + padding-left: 23px; +} + +/* ---------------------------------------------------------------- tables: an ink rule above, hairlines between */ + +table.tableblock, table.tableblock.frame-all, table.tableblock.frame-topbot { + border: 0; border-top: 2px solid var(--ink); border-collapse: collapse; + background: none; margin: 1.5rem 0 2.25rem; + font: 400 1.0625rem/1.45 var(--sans); +} +table.tableblock th.tableblock, table.tableblock td.tableblock { + padding: 9px 18px 9px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; +} +table.tableblock th.tableblock:last-child, table.tableblock td.tableblock:last-child { padding-right: 0; } +table.tableblock thead th.tableblock { + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .03em; color: var(--ink-soft); vertical-align: bottom; +} +table.tableblock p.tableblock, td.tableblock > .content > :last-child { font-family: var(--sans); font-size: 1em; color: var(--ink); max-width: none; } +table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), +table.stripes-hover tr:hover, table tr.even, table tr.alt { background: none; } +table.tableblock > caption.title { + padding-bottom: 6px; color: var(--ink-soft); font: italic 400 1.05rem/1.3 var(--serif); text-align: left; +} +@media (max-width: 767px) { table.tableblock { display: block; overflow-x: auto; } } + +/* ---------------------------------------------------------------- images and other blocks */ + +.imageblock { margin: 1.5rem 0 2rem; } +.imageblock img { border-radius: 2px; } +/* Diagrams with a transparent background have dark lines and text. */ +@media (prefers-color-scheme: dark) { .imageblock img { background: #fff; } } +.imageblock > .title, .videoblock > .title, .exampleblock > .title, .paragraph > .title, +.ulist > .title, .olist > .title, .dlist > .title, .openblock > .title { + margin-top: 6px; color: var(--ink-soft); font: italic 400 1.05rem/1.3 var(--serif); +} +.quoteblock, .sidebarblock > .content, .exampleblock > .content { + background: var(--paper-tint); border: 0; border-top: 1px solid var(--ribbon); border-radius: 0; + box-shadow: none; +} +.quoteblock { padding: 12px 18px 14px; margin: 1.5rem 0; } +.quoteblock blockquote, .quoteblock p { color: var(--ink); font-family: var(--serif); font-size: 1em; } +.quoteblock blockquote::before { display: none; } +.sidebarblock { background: none; border: 0; padding: 0; } +.sidebarblock > .content { padding: 12px 18px 14px; } +hr { border-color: var(--rule); } +.conum[data-value] { + background: var(--ribbon); color: var(--on-ribbon); border-radius: 3px; + font: 700 .75rem/1.3 var(--sans); +} +kbd { background: var(--paper); border: 1px solid var(--ribbon); border-radius: 3px; box-shadow: none; font-family: var(--mono); } +mark { background: var(--ribbon-wash); color: inherit; } + +/* ---------------------------------------------------------------- footer on cloth */ + +#footnotes { border-top: 1px solid var(--rule); } +#footnotes .footnote { font: 400 1rem/1.45 var(--sans); color: var(--ink-soft); } +#footer { max-width: none; padding: 32px 36px 40px; background: var(--cloth); } +#footer-text { color: var(--muted); font: 400 1rem/1.5 var(--sans); } +#footer a { color: var(--on-cloth); text-decoration-color: var(--ribbon-text); } + +/* ---------------------------------------------------------------- touch and motion */ + +@media (pointer: coarse) { + #toc a { display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding-block: 0; } +} +@media (prefers-reduced-motion: reduce) { + * { transition: none !important; scroll-behavior: auto !important; } +} + +@media print { + .mast, .code-bar, #toc { display: none !important; } + body.toc2 > #header, body.toc2 > #content { margin-left: auto; } +} diff --git a/wicket-user-guide/src/main/asciidoc/docinfo-footer.html b/wicket-user-guide/src/main/asciidoc/docinfo-footer.html new file mode 100644 index 0000000000..ebc7996293 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/docinfo-footer.html @@ -0,0 +1,17 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<script src="./js/guide.js"></script> diff --git a/wicket-user-guide/src/main/asciidoc/docinfo-header.html b/wicket-user-guide/src/main/asciidoc/docinfo-header.html new file mode 100644 index 0000000000..d5b886c4d7 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/docinfo-header.html @@ -0,0 +1,27 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<a class="skip-link" href="#content">Skip to content</a> +<header class="mast"> +<a class="mast-brand" href="https://wicket.apache.org/" aria-label="Apache Wicket"><img src="./img/wicket-mark.svg" alt="" width="30" height="30"><span>Apache Wicket</span></a> +<span class="mast-plate"><span class="mast-plate-label">Reference guide</span><span class="mast-version">{wicket_line}</span></span> +<nav class="mast-nav"> +<a class="mast-optional" href="https://wicket.apache.org/docs/">Docs</a> +<a href="https://nightlies.apache.org/wicket/apidocs/{wicket_line_major}.x/index.html">Javadoc</a> +<a class="mast-optional" href="https://wicket.apache.org/versions/">Other versions</a> +<a href="https://github.com/apache/wicket">GitHub</a> +</nav> +</header> diff --git a/wicket-user-guide/src/main/asciidoc/docinfo.html b/wicket-user-guide/src/main/asciidoc/docinfo.html new file mode 100644 index 0000000000..7c8d3891ae --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/docinfo.html @@ -0,0 +1,21 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<link rel="preload" href="./fonts/alegreya-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin> +<link rel="preload" href="./fonts/alegreya-latin-700-normal.woff2" as="font" type="font/woff2" crossorigin> +<link rel="preload" href="./fonts/jetbrains-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin> +<link rel="stylesheet" href="./css/wicket.css"> +<link rel="icon" href="./img/wicket-mark.svg" type="image/svg+xml"> diff --git a/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sans.txt b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sans.txt new file mode 100644 index 0000000000..67c15ec6a4 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sans.txt @@ -0,0 +1,93 @@ +Copyright 2013 The Alegreya Sans Project Authors (https://github.com/huertatipografica/Alegreya-Sans) AlegreyaSans-ThinItalic.ttf: Copyright 2013 The Alegreya Sans Project Authors (https://github.com/huertatipografica/Alegreya-Sans) AlegreyaSans-Light.ttf: Copyright 2013 The Alegreya Sans Project Authors (https://github.com/huertatipografica/Alegreya-Sans) AlegreyaSans-LightItalic.ttf: Copyright 2013 The Alegreya Sans Project Authors (https://github.com/huertatipografica/Alegreya-Sans) A [...] + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sc.txt b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sc.txt new file mode 100644 index 0000000000..fa5ca882f4 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya-sc.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) AlegreyaSC-Italic.ttf: Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) AlegreyaSC-Medium.ttf: Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) AlegreyaSC-MediumItalic.ttf: Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) AlegreyaSC-Bold.ttf: Copyright 2011 The Alegreya [...] + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya.txt b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya.txt new file mode 100644 index 0000000000..29a3284155 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-alegreya.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) Alegreya-Italic[wght].ttf: Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-jetbrains-mono.txt b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-jetbrains-mono.txt new file mode 100644 index 0000000000..8f7ed67113 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/fonts/LICENSE-jetbrains-mono.txt @@ -0,0 +1,93 @@ +Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-italic.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-italic.woff2 new file mode 100644 index 0000000000..1e096a7ecf Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-italic.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-normal.woff2 new file mode 100644 index 0000000000..b010ac524f Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-400-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-700-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-700-normal.woff2 new file mode 100644 index 0000000000..9e564e58a7 Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-latin-700-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-400-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-400-normal.woff2 new file mode 100644 index 0000000000..a0e956d503 Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-400-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-500-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-500-normal.woff2 new file mode 100644 index 0000000000..7d10231a33 Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-500-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-700-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-700-normal.woff2 new file mode 100644 index 0000000000..a23520a2db Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sans-latin-700-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sc-latin-500-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sc-latin-500-normal.woff2 new file mode 100644 index 0000000000..bbeb89391a Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/alegreya-sc-latin-500-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/fonts/jetbrains-mono-latin-400-normal.woff2 b/wicket-user-guide/src/main/asciidoc/fonts/jetbrains-mono-latin-400-normal.woff2 new file mode 100644 index 0000000000..585887339e Binary files /dev/null and b/wicket-user-guide/src/main/asciidoc/fonts/jetbrains-mono-latin-400-normal.woff2 differ diff --git a/wicket-user-guide/src/main/asciidoc/img/wicket-mark.svg b/wicket-user-guide/src/main/asciidoc/img/wicket-mark.svg new file mode 100644 index 0000000000..68d2a792aa --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/img/wicket-mark.svg @@ -0,0 +1,22 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<svg xmlns="http://www.w3.org/2000/svg" viewBox="199 0 64 64" width="64" height="64"> + <title>Apache Wicket</title> + <!-- The mark from the registered logo (logo-apachewicket.svg), unchanged: orange circle with the white figure. --> + <circle cx="231" cy="32" r="32" fill="#ff9925"/> + <path d="m 199,0 m 20,20 v 24 h 8 8 8 V 20 l -8,16 -4,-8 -4,8 z" fill="#ffffff"/> +</svg> diff --git a/wicket-user-guide/src/main/asciidoc/js/guide.js b/wicket-user-guide/src/main/asciidoc/js/guide.js new file mode 100644 index 0000000000..6341e7df44 --- /dev/null +++ b/wicket-user-guide/src/main/asciidoc/js/guide.js @@ -0,0 +1,180 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * The reference guide's page behaviour: the table of contents follows the section being read and + * shows only that chapter's sections, every listing gets a bar with its language and a copy button, + * and the places where markup binds to Java are marked in the code. + */ +(function () { + 'use strict'; + + var LANGUAGES = { java: 'Java', html: 'HTML', xml: 'XML', javascript: 'JavaScript', js: 'JavaScript', + bash: 'Shell', shell: 'Shell', properties: 'Properties', css: 'CSS', json: 'JSON' }; + + function addLandmarks() { + var content = document.getElementById('content'); + if (content) { + content.setAttribute('role', 'main'); + } + var toc = document.getElementById('toc'); + if (toc) { + toc.setAttribute('role', 'navigation'); + toc.setAttribute('aria-label', 'Table of contents'); + } + } + + function addCodeBars() { + var status = document.createElement('div'); + status.className = 'visually-hidden'; + status.setAttribute('role', 'status'); + document.body.appendChild(status); + + document.querySelectorAll('.listingblock > .content > pre').forEach(function (pre) { + var code = pre.querySelector('code'); + var lang = code && code.getAttribute('data-lang'); + var language = lang ? (LANGUAGES[lang] || lang) : ''; + var bar = document.createElement('div'); + bar.className = 'code-bar'; + + var label = document.createElement('span'); + label.className = 'code-lang'; + label.textContent = language; + bar.appendChild(label); + + if (navigator.clipboard) { + var button = document.createElement('button'); + button.type = 'button'; + button.className = 'code-copy'; + button.setAttribute('aria-label', language ? 'Copy ' + language + ' code' : 'Copy code'); + button.textContent = 'Copy'; + button.addEventListener('click', function () { + navigator.clipboard.writeText(pre.textContent).then(function () { + button.textContent = 'Copied'; + status.textContent = 'Copied'; + setTimeout(function () { + button.textContent = 'Copy'; + status.textContent = ''; + }, 2000); + }); + }); + bar.appendChild(button); + } + pre.parentNode.insertBefore(bar, pre); + pre.closest('.listingblock').classList.add('has-bar'); + }); + } + + function markWicketMarkup() { + document.querySelectorAll('pre.rouge code[data-lang="html"], pre.rouge code[data-lang="xml"]') + .forEach(function (code) { + code.querySelectorAll('.na').forEach(function (attribute) { + if (attribute.textContent.indexOf('wicket:') === 0) { + attribute.classList.add('wicket-id'); + } + }); + code.querySelectorAll('.nt').forEach(function (tag) { + if (tag.textContent.indexOf('wicket:') >= 0) { + tag.classList.add('wicket-tag'); + } + }); + }); + } + + function followSections() { + var toc = document.getElementById('toc'); + if (!toc) { + return; + } + var links = Array.prototype.slice.call(toc.querySelectorAll('a[href^="#"]')); + var entries = links.map(function (link) { + var match = /^(\d+(?:\.\d+)*\.)\s+(.*)$/.exec(link.textContent); + if (match) { + link.innerHTML = ''; + var number = document.createElement('span'); + number.className = 'toc-num'; + number.textContent = match[1]; + link.appendChild(number); + link.appendChild(document.createTextNode(match[2])); + } + var id = decodeURIComponent(link.getAttribute('href').substring(1)); + return { link: link, heading: document.getElementById(id) }; + }).filter(function (entry) { + return entry.heading; + }); + if (!entries.length) { + return; + } + document.documentElement.classList.add('js-toc'); + + var current = null; + function update() { + var offset = parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop) || 0; + var line = offset + window.innerHeight / 4; + var found = entries[0]; + for (var i = 0; i < entries.length; i++) { + if (entries[i].heading.getBoundingClientRect().top > line) { + break; + } + found = entries[i]; + } + if (found === current) { + return; + } + if (current) { + current.link.classList.remove('is-current'); + current.link.removeAttribute('aria-current'); + } + toc.querySelectorAll('li.is-open').forEach(function (li) { + li.classList.remove('is-open'); + }); + current = found; + current.link.classList.add('is-current'); + current.link.setAttribute('aria-current', 'location'); + for (var li = current.link.parentElement; li && li !== toc; li = li.parentElement) { + if (li.tagName === 'LI') { + li.classList.add('is-open'); + } + } + if (toc.scrollHeight > toc.clientHeight) { + var linkBox = current.link.getBoundingClientRect(); + var tocBox = toc.getBoundingClientRect(); + if (linkBox.top < tocBox.top + 40 || linkBox.bottom > tocBox.bottom - 40) { + toc.scrollTop += linkBox.top - tocBox.top - tocBox.height / 3; + } + } + } + + var pending = false; + window.addEventListener('scroll', function () { + if (!pending) { + pending = true; + requestAnimationFrame(function () { + pending = false; + update(); + }); + } + }, { passive: true }); + window.addEventListener('hashchange', update); + update(); + } + + addLandmarks(); + addCodeBars(); + markWicketMarkup(); + followSections(); +})(); diff --git a/wicket-user-guide/src/main/asciidoc/single.adoc b/wicket-user-guide/src/main/asciidoc/single.adoc index c04fe6ecee..e6b6cdac88 100644 --- a/wicket-user-guide/src/main/asciidoc/single.adoc +++ b/wicket-user-guide/src/main/asciidoc/single.adoc @@ -15,13 +15,13 @@ limitations under the License. //// -= Wicket 10.x Reference Guide += Wicket {wicket_line} Reference Guide The Apache Software Foundation :description: Official User Guide for Apache Wicket framework. :keywords: Apache Wicket, User Guide, examples, AJAX, stateless :toc: left -:icons: font :sectlinks: +:docinfo: shared :sectnums:
