diff options
author | Olivier Lacan <hi@olivierlacan.com> | 2018-10-19 18:41:32 -0400 |
---|---|---|
committer | Olivier Lacan <hi@olivierlacan.com> | 2018-10-19 19:26:47 -0400 |
commit | 068413431cd2b247c084ffd567a29f1abe5c41ff (patch) | |
tree | 184848ca269580dd60313c55b34483cf78a86926 /guides/source | |
parent | e3111c129a557bee8691c34acc209d0727418957 (diff) | |
download | rails-068413431cd2b247c084ffd567a29f1abe5c41ff.tar.gz rails-068413431cd2b247c084ffd567a29f1abe5c41ff.tar.bz2 rails-068413431cd2b247c084ffd567a29f1abe5c41ff.zip |
Use CSS flexbox for Guides index menu
This notably allows us to tile each category without pushing the page down vertically
as much as we previously did on any viewport wider than mobile sizes.
It also means we can fit more guides which will become useful in the future since
we have several new guides in the work.
Finally the new layout allows three clearly distinct columns to emerge:
- Start Here and Rails basics: Models, Views, Controllers, Other Components
- Digging Deeper, Extending Rails, Contributing, Maintenance
- Release Notes
Having Release Notes shoot back up to the top of the third column is great
because that makes finding the latest released version and its associated
release notes much easier without having to scroll down a bunch.
[ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/layout.html.erb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/guides/source/layout.html.erb b/guides/source/layout.html.erb index dd9175e312..1f42d72756 100644 --- a/guides/source/layout.html.erb +++ b/guides/source/layout.html.erb @@ -45,16 +45,16 @@ <a href="index.html" id="guidesMenu" class="guides-index-item nav-item">Guides Index</a> <div id="guides" class="clearfix" style="display: none;"> <hr /> - <% ['L', 'R'].each do |position| %> - <dl class="<%= position %>"> - <% docs_for_menu(position).each do |section| %> - <dt><%= section['name'] %></dt> - <% finished_documents(section['documents']).each do |document| %> - <dd><a href="<%= document['url'] %>"><%= document['name'] %></a></dd> - <% end %> + <div class="guides-section-container"> + <% documents_by_section.each do |section| %> + <div class="guides-section"> + <dt><%= section['name'] %></dt> + <% finished_documents(section['documents']).each do |document| %> + <dd><a href="<%= document['url'] %>"><%= document['name'] %></a></dd> + <% end %> + </div> <% end %> - </dl> - <% end %> + </div> </div> </li> <li><a class="nav-item" href="contributing_to_ruby_on_rails.html">Contribute</a></li> |