diff --git a/_bin/update-wiki.sh b/_bin/update-wiki.sh index 977f6b831df..668d1084697 100755 --- a/_bin/update-wiki.sh +++ b/_bin/update-wiki.sh @@ -17,7 +17,7 @@ echo The wiki contains "$PAGE_CNT" pages. { echo '---' - echo 'layout: base' + echo 'layout: jumbotronless' echo "title: 'All documents'" echo '---' echo @@ -52,15 +52,16 @@ cat 'wiki/_pages' | while read -r LINE; do # Generate TOC echo ' + toc_html = "" headings = @doc.css("#wiki-content h2, #wiki-content h3, #wiki-content h4") if headings.size() > 1 and @doc.css("#wiki-notoc").size() == 0 coder = HTMLEntities.new toc_idx = 0 toc_level = 2 first = true - puts "
" - puts "\n" end - puts "
" + toc_html << "\n" end ' @@ -98,7 +99,11 @@ cat 'wiki/_pages' | while read -r LINE; do end ' - echo 'print @doc.at_css "div#wiki-body"' + # Print the wiki body and the generated toc together. + echo ' + print toc_html + print @doc.at_css "div#wiki-body" + ' } | ruby >> "$WIKI_TMPFILE" # Perl regex soup below: diff --git a/_layouts/base.html.haml b/_layouts/base.html.haml index 940c9465c27..b447e658872 100644 --- a/_layouts/base.html.haml +++ b/_layouts/base.html.haml @@ -27,7 +27,7 @@ body { padding-top: 60px; } - %link{ :rel=>'stylesheet', :type=>'text/css', :href=>'http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css', :media=>'screen' } + %link{ :rel=>'stylesheet', :type=>'text/css', :href=>'http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.no-icons.min.css', :media=>'screen' } %link{ :rel=>'stylesheet', :type=>'text/css', :href=>'http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css', :media=>'screen' } -# SyntaxHighlighter @@ -41,13 +41,23 @@ %script{ :type=>'text/javascript', :src=>"#{site.base_url}/lib/common.js" } /[if lt IE 9] - %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js' } + %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js' } + %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/respond.js/1.2.0/respond.min.js' } %body - .navbar.navbar-fixed-top - .navbar-inner - .container - %a.brand{ :href=>"#{site.base_url}/index.html" } Netty project - %ul.nav + %a.sr-only{ :href=>'#content' } Skip navigation + %nav.navbar.navbar-default.navbar-fixed-top{ :role=>'navigation' } + .container + .navbar-header + %button.navbar-toggle{ :type=>'button', :data=>{ :toggle=>'collapse', :target=>'.navbar-collapse' } } + %span.sr-only Toggle navigation + %span.icon-bar + %span.icon-bar + %span.icon-bar + %a.navbar-brand{ :href=>"#{site.base_url}/index.html" } + %span.navbar-brand-logo + Netty project + .navbar-collapse.collapse + %ul.nav.navbar-nav %li{ :class=>'dropdown' } %a{ :href=>"#{site.base_url}#{site.posts[0].url}" } News @@ -70,7 +80,7 @@ %i{ :class=>'icon-download-alt' } #{r.version} %small ‐ #{r.date} - %li + %li %a{ :href=>'http://www.tldrlegal.com/l/APACHE2' } %i{ :class=>'icon-legal' } Apache License 2.0 @@ -129,17 +139,18 @@ %li %a{ :href=>'http://feeds.feedburner.com/netty_project' } %i{ :class=>'icon-rss' } - %form.navbar-search.pull-right{ :method=>'GET', :action=>"#{site.base_url}/search.html", :onsubmit=>'return validateGlobalSearchQuery()' } - %input#global-search-query.search-query{ :type=>'text', :name=>'q', :placeholder=>'Search' } + %form.navbar-form.navbar-right{ :role=>'search', :method=>'GET', :action=>"#{site.base_url}/search.html", :onsubmit=>'return validateGlobalSearchQuery()' } + .form-group + %input#global-search-query.search-query.form-control{ :type=>'text', :name=>'q', :placeholder=>'Search' } + #content + ~ content .container - .content.instapaper_body - ~ content %hr %footer %p Copyright © #{Date.today.year} %a{ :href=>"#{site.base_url}/index.html"} The Netty project - %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js' } - %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js' } + %script{ :type=>'text/javascript', :src=>'http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js' } + %script{ :type=>'text/javascript', :src=>'http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js' } %script{ :type=>'text/javascript', :src=>"#{site.base_url}/lib/common.footer.js" } diff --git a/_layouts/jumbotronless.html.haml b/_layouts/jumbotronless.html.haml new file mode 100644 index 00000000000..27a85fea717 --- /dev/null +++ b/_layouts/jumbotronless.html.haml @@ -0,0 +1,7 @@ +--- +layout: base +--- + +.container + ~ content + diff --git a/_layouts/news-item.html.haml b/_layouts/news-item.html.haml index 2330b60a5c4..90aa5f20b8d 100644 --- a/_layouts/news-item.html.haml +++ b/_layouts/news-item.html.haml @@ -1,5 +1,5 @@ --- -layout: base +layout: jumbotronless --- .news-item diff --git a/_layouts/wiki.html.haml b/_layouts/wiki.html.haml index 9524383490b..53929136c25 100644 --- a/_layouts/wiki.html.haml +++ b/_layouts/wiki.html.haml @@ -1,5 +1,5 @@ --- -layout: base +layout: jumbotronless --- .wiki-item diff --git a/community.html.haml b/community.html.haml index 07ffd665347..e2a1a292e3a 100644 --- a/community.html.haml +++ b/community.html.haml @@ -3,36 +3,38 @@ layout: base title: Get Involved --- .jumbotron - %p.lead - Getting involved with the Netty community is easier than you think. - %br - %em Tell us what you think, and open the future of network programming. + .container + %p + Getting involved with the Netty community is easier than you think. + %br + %em Tell us what you think, and open the future of network programming. -%h3 Post questions +.container + %h3 Post questions -%p We use StackOverflow as the place to ask the questions. Just tag your question with 'netty', and then we will respond. + %p We use StackOverflow as the place to ask the questions. Just tag your question with 'netty', and then we will respond. -%h3 Stay tuned & spread the words + %h3 Stay tuned & spread the words -%p Follow @netty_project at Twitter, mention us, and use the '#netty' hash­tag. Subscribe to our RSS feed to get useful information. If you are interested in how we work with code, watch our Github repository. + %p Follow @netty_project at Twitter, mention us, and use the '#netty' hash­tag. Subscribe to our RSS feed to get useful information. If you are interested in how we work with code, watch our Github repository. -%p Even better, if you are in the mood of writing something longer, think about writing an article about Netty and let us know. + %p Even better, if you are in the mood of writing something longer, think about writing an article about Netty and let us know. -%h3 Report bugs & security issues + %h3 Report bugs & security issues -%p Found a bug? Browse our issue tracker and file an issue if it was not reported before. Get back and let us know if it's fixed. + %p Found a bug? Browse our issue tracker and file an issue if it was not reported before. Get back and let us know if it's fixed. -%p If you think the bug you found is likely to make Netty-based applications vulnerable to an attack, please do not use our public issue tracker but report it to the dedicated private Google Group. + %p If you think the bug you found is likely to make Netty-based applications vulnerable to an attack, please do not use our public issue tracker but report it to the dedicated private Google Group. -%h3 Commit your code + %h3 Commit your code -%p It's all open source! Netty is hosted at Github. Feel free to fork it, issue a pull request, and join the discussion. We also have a Google Group for the topics that need a broader discussion. If your contribution is not trivial, you will have to sign up the Contributor License Agreement (CLA). Before working with Netty source code, you might want to read the developer guide. + %p It's all open source! Netty is hosted at Github. Feel free to fork it, issue a pull request, and join the discussion. We also have a Google Group for the topics that need a broader discussion. If your contribution is not trivial, you will have to sign up the Contributor License Agreement (CLA). Before working with Netty source code, you might want to read the developer guide. -%h3 Sponsor us + %h3 Sponsor us -%p You or your company can also donate the resources we need for sustainable development of the project, such as fund to cover our hosting cost, heart-warming gift, and software license. The current donors include: + %p You or your company can also donate the resources we need for sustainable development of the project, such as fund to cover our hosting cost, heart-warming gift, and software license. The current donors include: -%ul - %li JetBrains - IntelliJ IDEA Ultimate Edition - %li YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler. + %ul + %li JetBrains - IntelliJ IDEA Ultimate Edition + %li YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler. diff --git a/downloads.html.haml b/downloads.html.haml index bd8ea615646..f3fbe2e1f77 100644 --- a/downloads.html.haml +++ b/downloads.html.haml @@ -1,5 +1,5 @@ --- -layout: base +layout: jumbotronless title: Downloads --- diff --git a/index.html.haml b/index.html.haml index e064b6be098..67bf80bbd53 100644 --- a/index.html.haml +++ b/index.html.haml @@ -4,50 +4,52 @@ title: Home --- .jumbotron - %p.lead - Netty is - %em an asynchronous event-driven network application framework - %br - for rapid development of maintainable high performance protocol servers & clients. + .container + %p + Netty is + %em an asynchronous event-driven network application framework + %br + for rapid development of maintainable high performance protocol servers & clients. -.text-center - %img{ :src=>'../images/components.png' } +.container + .text-center + %img{ :src=>'../images/components.png' } -%p Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. + %p Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. -%p 'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise. + %p 'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise. -%h2 Features + %h2 Features -%h3 Design + %h3 Design -%ul - %li Unified API for various transport types - blocking and non-blocking socket - %li Based on a flexible and extensible event model which allows clear separation of concerns - %li Highly customizable thread model - single thread, one or more thread pools such as SEDA - %li True connectionless datagram socket support (since 3.1) + %ul + %li Unified API for various transport types - blocking and non-blocking socket + %li Based on a flexible and extensible event model which allows clear separation of concerns + %li Highly customizable thread model - single thread, one or more thread pools such as SEDA + %li True connectionless datagram socket support (since 3.1) -%h3 Ease of use + %h3 Ease of use -%ul - %li Well-documented Javadoc, user guide and examples - %li No additional dependencies but JDK 1.5 (or above) + %ul + %li Well-documented Javadoc, user guide and examples + %li No additional dependencies but JDK 1.5 (or above) -%h3 Performance + %h3 Performance -%ul - %li Better throughput, lower latency - %li Less resource consumption - %li Minimized unnecessary memory copy + %ul + %li Better throughput, lower latency + %li Less resource consumption + %li Minimized unnecessary memory copy -%h3 Security + %h3 Security -%ul - %li Complete SSL/TLS and StartTLS support + %ul + %li Complete SSL/TLS and StartTLS support -%h3 Community + %h3 Community -%ul - %li Release early, release often - %li The author has been writing similar frameworks since 2003 and he still finds your feed back precious! + %ul + %li Release early, release often + %li The author has been writing similar frameworks since 2003 and he still finds your feed back precious! diff --git a/lib/common.css b/lib/common.css index dd7419cf667..4c5f6341eac 100644 --- a/lib/common.css +++ b/lib/common.css @@ -1,6 +1,6 @@ -/* Fix the case where dropdown menu disappears too early */ -div.navbar ul.dropdown-menu { - margin-top: 0px; +body { + position: relative; /* For scrollyspy */ + padding-top: 50px; /* Account for fixed navbar */ } /* Use mouse hover to open/close a dropdown menu */ @@ -9,9 +9,8 @@ ul.nav li.dropdown:hover > ul.dropdown-menu { } /* Add the project logo */ -div.navbar a.brand { - margin-left: 0px; - padding-left: 40px; +.navbar-brand-logo { + padding: 18px 20px; background-image: url(../images/logo.png); background-repeat: no-repeat; background-size: 36px 32px; @@ -59,25 +58,30 @@ h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { /* Prettify wiki page ToC */ .wiki-toc { - max-width: 250px; padding: 8px 0; margin: 0px 0px 12px 16px; } +.wiki-toc .nav-header { + display: none; +} + .wiki-toc > ul ul { - padding-right: 0px; + padding-right: 0em; + padding-left: 1.2em; } .wiki-toc li a { white-space: nowrap; overflow: hidden; - max-width: 220px; text-overflow: ellipsis; + padding-top: 0.1em; + padding-bottom: 0.1em; } .bookpromo { float: right; - max-width: 152px; + max-width: 182px; padding: 8px 0; margin: 0px 0px 12px 16px; } @@ -92,7 +96,7 @@ h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { } .bintraypromo { - margin-top: 0.25em; + margin-top: 0.49em; margin-bottom: 0.1em; } @@ -104,15 +108,17 @@ h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { /* Remove excessive space between tab header and tab pane when the first tag is h2/3/4 */ .tab-pane>h2:first-child, .tab-pane>h3:first-child, .tab-pane>h4:first-child{ - margin-top: 0; - line-height: 1em; + margin-top: 0.5em; } +/* #wiki-body table.table { width: auto; margin-left:auto; margin-right:auto; } +*/ + /* Override SyntaxHighlighter theme */ .syntaxhighlighter { diff --git a/lib/common.footer.js b/lib/common.footer.js index 13d304778d9..9864d25a4f5 100644 --- a/lib/common.footer.js +++ b/lib/common.footer.js @@ -1,3 +1,6 @@ -SyntaxHighlighter.defaults['gutter'] = false; -SyntaxHighlighter.defaults['toolbar'] = false; -SyntaxHighlighter.all(); +$(function() { + SyntaxHighlighter.defaults['gutter'] = false; + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); +}); + diff --git a/news/index.html.haml b/news/index.html.haml index 2be3d98ffb1..718e774e887 100644 --- a/news/index.html.haml +++ b/news/index.html.haml @@ -1,5 +1,5 @@ --- -layout: base +layout: jumbotronless title: All news items --- diff --git a/testimonials.html.haml b/testimonials.html.haml index 85d23350d1f..424d0cf7485 100644 --- a/testimonials.html.haml +++ b/testimonials.html.haml @@ -1,5 +1,5 @@ --- -layout: base +layout: jumbotronless title: Testimonials ---