# HG changeset patch # User Liam Crilly <liam.cri...@nginx.com> # Date 1659696358 -3600 # Fri Aug 05 11:45:58 2022 +0100 # Node ID 8781046c34459c05b4d6f296bbbadc3733d51b17 # Parent 1087570ec093271d10de8e901122c99003a79b6d Modified layout of navigation menu.
This patch modifies the layout of the menu navigation with several changes: - A two-level heirarchy organises content into sections for nginx, other nginx projects, and information - The "projects" of njs and unit are moved up, to a more prominent position - News is moved lower down, to the "info" section. A third menu level contains the individual years so that the top of the menu is always the same, regardless of which page you are on. - Links to external sites are indicated by a right-arrow character diff -r 1087570ec093 -r 8781046c3445 xml/menu.xml --- a/xml/menu.xml Fri Aug 05 11:45:28 2022 +0100 +++ b/xml/menu.xml Fri Aug 05 11:45:58 2022 +0100 @@ -22,6 +22,7 @@ <item /> --> +<item> nginx </item> <item href="/" lang="en"> 新闻 </item> <item href="/cn/"> nginx 介绍 </item> <item href="/en/download.html" lang="en"> 下载 </item> @@ -32,14 +33,16 @@ <item href="/en/support.html" lang="en"> 支持 </item> <item /> +<item> projects </item> +<item href="https://unit.nginx.org/"> unit </item> +<item href="/en/docs/njs/"> njs </item> +<item /> + +<item> info </item> <item href="http://trac.nginx.org/nginx"> trac </item> <item href="http://twitter.com/nginxorg"> twitter </item> <item href="http://nginx.com/blog/"> blog </item> <item /> - -<item href="https://unit.nginx.org/"> unit </item> -<item href="/en/docs/njs/"> njs </item> - </menu> @@ -58,6 +61,22 @@ <item /> --> +<item> nginx </item> +<item href="/en/"> about </item> +<item href="/en/download.html"> download </item> +<item href="/en/security_advisories.html"> security </item> +<item href="/en/docs/"> documentation </item> +<item href="/en/docs/faq.html"> faq </item> +<item href="/en/books.html"> books </item> +<item href="/en/support.html"> support </item> +<item /> + +<item> projects </item> +<item href="/en/docs/njs/"> njs </item> +<item href="https://unit.nginx.org/"> unit </item> +<item /> + +<item> info </item> <item href="/"> news </item> <item href="2021.html" year="2021" /> <item href="2020.html" year="2020" /> @@ -74,23 +93,11 @@ <item href="2009.html" year="2009" /> <item year="" /> -<item href="/en/"> about </item> -<item href="/en/download.html"> download </item> -<item href="/en/security_advisories.html"> security </item> -<item href="/en/docs/"> documentation </item> -<item href="/en/docs/faq.html"> faq </item> -<item href="/en/books.html"> books </item> -<item href="/en/support.html"> support </item> -<item /> - <item href="http://trac.nginx.org/nginx"> trac </item> <item href="http://twitter.com/nginxorg"> twitter </item> <item href="https://www.nginx.com/blog/"> blog </item> <item /> -<item href="https://unit.nginx.org/"> unit </item> -<item href="/en/docs/njs/"> njs </item> - </menu> @@ -144,6 +151,7 @@ <item /> --> +<item> nginx </item> <item href="/" lang="en"> ニュ�`ス </item> <item href="/ja/"> nginx について </item> <item href="/en/download.html" lang="en"> ダウンロ�`ド </item> @@ -154,14 +162,16 @@ <item href="/en/support.html" lang="en"> サポ�`ト </item> <item /> +<item> projects </item> +<item href="https://unit.nginx.org/"> unit </item> +<item href="/en/docs/njs/"> njs </item> +<item /> + <item href="http://trac.nginx.org/nginx"> trac </item> <item href="http://twitter.com/nginxorg"> twitter </item> <item href="http://nginx.com/blog/"> blog </item> <item /> -<item href="https://unit.nginx.org/"> unit </item> -<item href="/en/docs/njs/"> njs </item> - </menu> @@ -180,6 +190,7 @@ <item /> --> +<item> nginx </item> <item href="/" lang="en"> новости </item> <item href="/ru/"> об nginx </item> <item href="/ru/download.html"> скачать </item> @@ -190,14 +201,17 @@ <item href="/ru/support.html"> поддержка </item> <item /> +<item> проекты </item> +<item href="https://unit.nginx.org/" lang="en"> unit </item> +<item href="/ru/docs/njs/"> njs </item> +<item /> + +<item> информация </item> <item href="http://trac.nginx.org/nginx"> trac </item> <item href="http://twitter.com/nginxorg"> twitter </item> <item href="https://www.nginx.com/blog/"> blog </item> <item /> -<item href="https://unit.nginx.org/"> unit </item> -<item href="/ru/docs/njs/"> njs </item> - </menu> diff -r 1087570ec093 -r 8781046c3445 xsls/menu.xsls --- a/xsls/menu.xsls Fri Aug 05 11:45:28 2022 +0100 +++ b/xsls/menu.xsls Fri Aug 05 11:45:58 2022 +0100 @@ -15,9 +15,9 @@ X:if "@href = $LINK" { X:if "$YEAR and @href='/'" { - <a href="./"> news </a> <br/> +   <a href="./"> news </a> <br/> } else { - !{ normalize-space(text()) }<br/> +   !{ normalize-space(text()) }<br/> } } else { @@ -47,7 +47,7 @@ } } else { - <a> +   <a> X:attribute "href" { X:if "starts-with(@href, $DIRNAME)" { @@ -75,9 +75,9 @@ X:template = "menu/item[@year]" { X:if "$YEAR or $LINK='/'" { X:if "$YEAR=@year" { - !{@year} <br/> +     !{@year} <br/> } else { - X:if "@href" { <a href="{@href}"> !{@year} </a> } + X:if "@href" {     <a href="{@href}"> !{@year} </a> } <br/> } } @@ -85,7 +85,7 @@ X:template = "menu/item[starts-with(@href, 'http://') or starts-with(@href, 'https://')]" { - <a href="{@href}"> !{ normalize-space(text()) } </a> +   <a href="{@href}"> !{ normalize-space(text()) } </a>→ X:if "@lang" { X:text { [} !{@lang} X:text {]}} <br/> }
_______________________________________________ nginx-devel mailing list -- nginx-devel@nginx.org To unsubscribe send an email to nginx-devel-le...@nginx.org