devdocs/views/app.erb
Thibaut Courouble 39b9846d78 Improve tab navigation
Closes #396.
2016-06-26 18:20:30 -04:00

40 lines
1.9 KiB
Text

<div class="_app<%= " #{app_layout}" if app_layout %>" role="application">
<header class="_header" role="banner">
<button type="button" class="_mobile-btn _back-btn">Back</button>
<button type="button" class="_mobile-btn _forward-btn">Forward</button>
<button type="button" class="_mobile-btn _menu-btn">Menu</button>
<button type="button" class="_mobile-btn _home-btn">Home</button>
<form class="_search" role="search">
<input type="search" class="_search-input" placeholder="Search&hellip;" autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false" maxlength="30" aria-label="Search">
<button type="reset" class="_search-clear" title="Clear search">Clear search</button>
<div class="_search-tag"></div>
</form>
<h1 class="_logo">
<a href="/" class="_nav-link" title="Offline API Documentation Browser">DevDocs</a><%= "/ #{@doc['full_name']}" if @doc %>
</h1>
<nav class="_nav" role="navigation">
<a href="/offline" class="_nav-link">Offline</a>
<a href="/about" class="_nav-link">About</a>
<a href="/news" class="_nav-link">News</a>
<a href="/help" class="_nav-link">Tips</a>
</nav>
</header>
<section class="_sidebar" tabindex="-1">
<div class="_list" role="navigation">
<% unless @doc %>
<% App.docs.each do |slug, doc| %>
<a href="/<%= slug %>/" class="_list-item"><span class="_list-arrow"></span><%= doc['full_name'] %></a>
<% end %>
<% end %>
</div>
</section>
<div class="_container" role="document">
<main class="_content _content-loading" role="main" tabindex="1"></main>
</div>
</div>
<style data-size="<%= app_size %>" data-resizer>
._container { margin-left: <%= app_size %>; }
._search, ._list, ._sidebar-footer { width: <%= app_size %>; }
._list-hover.clone { min-width: <%= app_size %>; }
._notice, ._path, ._resizer { left: <%= app_size %>; }
</style>