github.com/shyftnetwork/go-empyrean@v1.8.3-0.20191127201940-fbfca9338f04/shyft_documentation/source/layouts/layout.erb (about) 1 <%# 2 Copyright 2008-2013 Concur Technologies, Inc. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); you may 5 not use this file except in compliance with the License. You may obtain 6 a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 License for the specific language governing permissions and limitations 14 under the License. 15 %> 16 <% language_tabs = current_page.data.language_tabs || [] %> 17 <% page_content = yield %> 18 <% 19 if current_page.data.includes 20 current_page.data.includes.each do |include| 21 page_content += partial("includes/#{include}") 22 end 23 end 24 %> 25 26 <!doctype html> 27 <html> 28 <head> 29 <meta charset="utf-8"> 30 <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> 31 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 32 <title><%= current_page.data.title || "Shyft API Documentation" %></title> 33 <%= favicon_tag 'images/shyftlogo.png' %> 34 <style> 35 <%= Rouge::Themes::MonokaiSublime.render(:scope => '.highlight') %> 36 </style> 37 <%= stylesheet_link_tag :screen, media: :screen %> 38 <%= stylesheet_link_tag :print, media: :print %> 39 <% if current_page.data.search %> 40 <%= javascript_include_tag "all" %> 41 <% else %> 42 <%= javascript_include_tag "all_nosearch" %> 43 <% end %> 44 </head> 45 46 <body class="<%= page_classes %>" data-languages="<%=h language_tabs.map{ |lang| lang.is_a?(Hash) ? lang.keys.first : lang }.to_json %>"> 47 <a href="#" id="nav-button"> 48 <span> 49 NAV 50 <%= image_tag('navbar.png') %> 51 </span> 52 </a> 53 <div class="toc-wrapper"> 54 <%= image_tag "logo.png", class: 'logo' %> 55 <% if language_tabs.any? %> 56 <div class="lang-selector"> 57 <% language_tabs.each do |lang| %> 58 <% if lang.is_a? Hash %> 59 <a href="#" data-language-name="<%= lang.keys.first %>"><%= lang.values.first %></a> 60 <% else %> 61 <a href="#" data-language-name="<%= lang %>"><%= lang %></a> 62 <% end %> 63 <% end %> 64 </div> 65 <% end %> 66 <% if current_page.data.search %> 67 <div class="search"> 68 <input type="text" class="search" id="input-search" placeholder="Search"> 69 </div> 70 <ul class="search-results"></ul> 71 <% end %> 72 <div id="toc" class="toc-list-h1"> 73 <% toc_data(page_content).each do |h1| %> 74 <li> 75 <a href="#<%= h1[:id] %>" class="toc-h1 toc-link" data-title="<%= h1[:content].to_s.parameterize %>"><%= h1[:content] %></a> 76 <% if h1[:children].length > 0 %> 77 <ul class="toc-list-h2"> 78 <% h1[:children].each do |h2| %> 79 <li> 80 <a href="#<%= h2[:id] %>" class="toc-h2 toc-link" data-title="<%= h2[:content].to_s.parameterize %>"><%= h2[:content] %></a> 81 </li> 82 <% end %> 83 </ul> 84 <% end %> 85 </li> 86 <% end %> 87 </div> 88 <% if current_page.data.toc_footers %> 89 <ul class="toc-footer"> 90 <% current_page.data.toc_footers.each do |footer| %> 91 <li><%= footer %></li> 92 <% end %> 93 </ul> 94 <% end %> 95 </div> 96 <div class="page-wrapper"> 97 <div class="dark-box"></div> 98 <div class="content"> 99 <%= page_content %> 100 </div> 101 <div class="dark-box"> 102 <% if language_tabs.any? %> 103 <div class="lang-selector"> 104 <% language_tabs.each do |lang| %> 105 <% if lang.is_a? Hash %> 106 <a href="#" data-language-name="<%= lang.keys.first %>"><%= lang.values.first %></a> 107 <% else %> 108 <a href="#" data-language-name="<%= lang %>"><%= lang %></a> 109 <% end %> 110 <% end %> 111 </div> 112 <% end %> 113 </div> 114 </div> 115 </body> 116 </html>