github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/website/_layouts/docs.html (about) 1 --- 2 layout: base 3 categories: 4 - Project 5 - User Guide 6 - Architecture Guide 7 - Compatibility 8 --- 9 10 <div class="container"> 11 <div class="row"> 12 <div class="col-md-3"> 13 <nav class="sidebar" id="sidebar-nav"> 14 {% for category in layout.categories %} 15 <h3>{{ category }}</h3> 16 <ul class="sidebar-nav"> 17 {% assign subcats = site.pages | where: 'layout', 'docs' | where: 'category', category | group_by: 'subcategory' | sort: 'name', 'first' %} 18 {% for subcategory in subcats %} 19 {% assign sorted_pages = subcategory.items | where: 'include_in_menu', true | sort: 'weight', 'last' %} 20 {% comment %}If all pages in the subcategory are excluded don't show it.{% endcomment %} 21 {% if sorted_pages.size > 0 %} 22 {% if subcategory.name != "" %} 23 {% assign cid = category | remove: " " | downcase %} 24 {% assign sid = subcategory.name | remove: " " | downcase %} 25 <li> 26 {% comment %} 27 If the current page is in the sub-category then set the collapsible to expanded. 28 See: https://getbootstrap.com/docs/3.3/javascript/#collapse 29 {% endcomment %} 30 {% assign expanded = false %} 31 {% for p in sorted_pages %}{% if page.url == p.url %}{% assign expanded = true %}{% endif %}{% endfor %} 32 <a class="sidebar-nav-heading" data-toggle="collapse" href="#{{ cid }}-{{ sid }}" {% if expanded %}aria-expanded="true"{% else %}aria-expanded="false"{% endif %} aria-controls="{{ cid }}-{{ sid }}">{{ subcategory.name }}<span class="caret"></span></a> 33 <ul class="collapse{% if expanded %} in{% endif %} sidebar-nav sidebar-submenu" id="{{ cid }}-{{ sid }}"> 34 {% endif %} 35 {% for p in sorted_pages %} 36 <li{% if page.url == p.url %} class="active"{% endif %}><a href="{{ p.url }}">{{ p.title }}</a></li> 37 {% endfor %} 38 {% if subcategory.name != "" %} 39 </li> 40 </ul> 41 {% endif %} 42 {% endif %} 43 {% endfor %} 44 </ul> 45 {% endfor %} 46 </nav> 47 </div> 48 49 <div class="col-md-9"> 50 <h1>{{ page.title }}</h1> 51 {% if page.editpath %} 52 <p> 53 <a href="https://github.com/google/gvisor/edit/master/{{page.editpath}}" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> Edit this page</a> 54 <a href="https://github.com/google/gvisor/issues/new?title={{page.title | url_encode}}" target="_blank" rel="noopener"><i class="fab fa-github fa-fw"></i> Create issue</a> 55 </p> 56 {% endif %} 57 <div class="docs-content"> 58 {{ content }} 59 </div> 60 </div> 61 </div> 62 </div>