Files
gvisor/website/_layouts/docs.html
T
Ian Lewis feb1d3d5a7 Clean up html on the website.
- Fixes some html validation issues.
- Fixes links on security basics blog post.
- Adds rel=noopener to links with target=_blank and adds a check to
  htmlproofer.
- Add favicon check to htmlproofer.

Fixes #3286
Fixes #3284

PiperOrigin-RevId: 321892602
2020-07-17 18:27:41 -07:00

60 lines
2.1 KiB
HTML

---
layout: base
categories:
- Project
- User Guide
- Architecture Guide
- Compatibility
---
<div class="container">
<div class="row">
<div class="col-md-3">
<nav class="sidebar" id="sidebar-nav">
{% for category in layout.categories %}
<h3>{{ category }}</h3>
<ul class="sidebar-nav">
{% assign sorted_pages = site.pages | where: 'layout', 'docs' | where: 'category', category | sort: 'weight' | sort: 'subcategory' %}
{% assign subcategory = nil %}
{% for p in sorted_pages %}
{% if p.subcategory != subcategory %}
{% if subcategory != nil %}
</ul>
</li>
{% endif %}
{% assign subcategory = p.subcategory %}
{% if subcategory != nil %}
{% assign ac = "aria-controls" %}
{% assign cid = p.category | remove: " " | downcase %}
{% assign sid = p.subcategory | remove: " " | downcase %}
<li>
<a class="sidebar-nav-heading" data-toggle="collapse" href="#{{ cid }}-{{ sid }}" aria-expanded="false" {{ ac }}="{{ cid }}-{{ sid }}">{{ subcategory }}<span class="caret"></span></a>
<ul class="collapse sidebar-nav sidebar-submenu" id="{{ cid }}-{{ sid }}">
{% endif %}
{% endif %}
<li><a href="{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
{% if subcategory != nil %}
</ul>
</li>
{% endif %}
</ul>
{% endfor %}
</nav>
</div>
<div class="col-md-9">
<h1>{{ page.title }}</h1>
{% if page.editpath %}
<p>
<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>
<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>
</p>
{% endif %}
<div class="docs-content">
{{ content }}
</div>
</div>
</div>
</div>