Skip to content

Commit

Permalink
Upgrade to Bootstrap 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trustin committed Sep 5, 2013
1 parent 684af07 commit aa39ca9
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 97 deletions.
27 changes: 16 additions & 11 deletions _bin/update-wiki.sh
Expand Up @@ -17,7 +17,7 @@ echo The wiki contains "$PAGE_CNT" pages.

{
echo '---'
echo 'layout: base'
echo 'layout: jumbotronless'
echo "title: 'All documents'"
echo '---'
echo
Expand Down Expand Up @@ -52,42 +52,43 @@ 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 "<div class=\"wiki-toc well pull-right\">"
puts "<ul class=\"nav nav-list\">"
puts "<li class=\"nav-header\">Table of Contents"
toc_html << "<div class=\"wiki-toc col-md-3 well pull-right hidden-print\" role=\"complementary\">\n"
toc_html << "<ul class=\"nav nav-list nav-stacked\">\n"
toc_html << "<li class=\"nav-header\">Table of Contents\n"
for h in headings
section_id = "wiki-" + h.name + "-" + toc_idx.to_s
toc_idx = toc_idx + 1
h["id"] = section_id
new_toc_level = h.name[1].ord - 48
toc_text = coder.encode(h.inner_text).strip
if new_toc_level == toc_level
puts "</li><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>"
toc_html << "</li><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>\n"
first = false
elsif new_toc_level == toc_level + 1
if first # first heading is not h2 but h3
puts "</li><li>"
toc_html << "</li><li>\n"
end
toc_level = new_toc_level
puts "<ul class=\"nav nav-list\"><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>"
toc_html << "<ul class=\"nav nav-list nav-stacked\"><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>\n"
first = false;
elsif !first and new_toc_level == toc_level - 1
toc_level = new_toc_level
puts "</li></ul></li><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>"
toc_html << "</li></ul></li><li><a href=\"#" + section_id + "\" title=\"" + toc_text + "\">" + toc_text + "</a>\n"
first = false;
end
end
while toc_level >= 2
toc_level = toc_level - 1
puts "</li></ul>"
toc_html << "</li></ul>\n"
end
puts "</div>"
toc_html << "</div>\n"
end
'

Expand All @@ -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:
Expand Down
39 changes: 25 additions & 14 deletions _layouts/base.html.haml
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -70,7 +80,7 @@
%i{ :class=>'icon-download-alt' }
#{r.version}
%small &dash; #{r.date}
%li
%li
%a{ :href=>'http://www.tldrlegal.com/l/APACHE2' }
%i{ :class=>'icon-legal' }
Apache License 2.0
Expand Down Expand Up @@ -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 &copy; #{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" }

7 changes: 7 additions & 0 deletions _layouts/jumbotronless.html.haml
@@ -0,0 +1,7 @@
---
layout: base
---

.container
~ content

2 changes: 1 addition & 1 deletion _layouts/news-item.html.haml
@@ -1,5 +1,5 @@
---
layout: base
layout: jumbotronless
---

.news-item
Expand Down
2 changes: 1 addition & 1 deletion _layouts/wiki.html.haml
@@ -1,5 +1,5 @@
---
layout: base
layout: jumbotronless
---

.wiki-item
Expand Down
40 changes: 21 additions & 19 deletions community.html.haml
Expand Up @@ -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 <a href="http://stackoverflow.com/questions/tagged/netty">StackOverflow</a> as the place to ask the questions. Just tag your question with '<strong>netty</strong>', and then we will respond.
%p We use <a href="http://stackoverflow.com/questions/tagged/netty">StackOverflow</a> as the place to ask the questions. Just tag your question with '<strong>netty</strong>', and then we will respond.

%h3 Stay tuned &amp; spread the words
%h3 Stay tuned &amp; spread the words

%p Follow <a href="https://twitter.com/netty_project">@netty_project</a> at Twitter, mention us, and use the '<a href="#{site.twitter_search_url}"><strong>#netty</strong></a>' hash­tag. Subscribe to <a href="http://feeds.feedburner.com/netty_project">our RSS feed</a> to get useful information. If you are interested in how we work with code, watch <a href="https://github.com/netty/netty">our Github repository</a>.
%p Follow <a href="https://twitter.com/netty_project">@netty_project</a> at Twitter, mention us, and use the '<a href="#{site.twitter_search_url}"><strong>#netty</strong></a>' hash­tag. Subscribe to <a href="http://feeds.feedburner.com/netty_project">our RSS feed</a> to get useful information. If you are interested in how we work with code, watch <a href="https://github.com/netty/netty">our Github repository</a>.

%p Even better, if you are in the mood of writing something longer, think about writing <a href="../wiki/RelatedArticles.html">an article about Netty</a> and let us know.
%p Even better, if you are in the mood of writing something longer, think about writing <a href="../wiki/RelatedArticles.html">an article about Netty</a> and let us know.

%h3 Report bugs &amp; security issues
%h3 Report bugs &amp; security issues

%p Found a bug? Browse <a href="https://github.com/netty/netty/issues">our issue tracker</a> 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 <a href="https://github.com/netty/netty/issues">our issue tracker</a> 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 <a href="https://groups.google.com/d/forum/netty-security">the dedicated private Google Group</a>.
%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 <a href="https://groups.google.com/d/forum/netty-security">the dedicated private Google Group</a>.

%h3 Commit your code
%h3 Commit your code

%p It's all open source! Netty is hosted at <a href="https://github.com/netty/netty">Github</a>. Feel free to fork it, issue a pull request, and join the discussion. We also have a <a href="https://groups.google.com/d/forum/netty">Google Group</a> for the topics that need a broader discussion. If your contribution is not trivial, you will have to sign up the <a href="https://docs.google.com/spreadsheet/viewform?formkey=dHBjc1YzdWhsZERUQnhlSklsbG1KT1E6MQ">Contributor License Agreement (CLA)</a>. Before working with Netty source code, you might want to read <a href="../wiki/developer-guide.html">the developer guide</a>.
%p It's all open source! Netty is hosted at <a href="https://github.com/netty/netty">Github</a>. Feel free to fork it, issue a pull request, and join the discussion. We also have a <a href="https://groups.google.com/d/forum/netty">Google Group</a> for the topics that need a broader discussion. If your contribution is not trivial, you will have to sign up the <a href="https://docs.google.com/spreadsheet/viewform?formkey=dHBjc1YzdWhsZERUQnhlSklsbG1KT1E6MQ">Contributor License Agreement (CLA)</a>. Before working with Netty source code, you might want to read <a href="../wiki/developer-guide.html">the developer guide</a>.

%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 <a href="http://www.jetbrains.com/">JetBrains</a> - <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> Ultimate Edition
%li <a href="http://www.yourkit.com/">YourKit</a> 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: <a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and <a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>.
%ul
%li <a href="http://www.jetbrains.com/">JetBrains</a> - <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> Ultimate Edition
%li <a href="http://www.yourkit.com/">YourKit</a> 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: <a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and <a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>.

2 changes: 1 addition & 1 deletion downloads.html.haml
@@ -1,5 +1,5 @@
---
layout: base
layout: jumbotronless
title: Downloads
---

Expand Down
66 changes: 34 additions & 32 deletions index.html.haml
Expand Up @@ -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 &amp; clients.
.container
%p
Netty is
%em an asynchronous event-driven network application framework
%br
for rapid development of maintainable high performance protocol servers &amp; 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!

0 comments on commit aa39ca9

Please sign in to comment.