pebble/devsite/source/_layouts/guides/master.html
2025-02-24 18:58:29 -08:00

62 lines
2.2 KiB
HTML

---
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
layout: sidebar_narrow
menu_section: guides
sidebar_only: false
---
<div class="section-menu section-menu--guides section-menu--light">
<div class="section-menu__header">
<h3><a href="/guides/">Guides</a></h3>
</div>
<ul>
<li class="section-menu__item{% if page.url == '/guides/toc/' %} active{% endif %}">
<a href="/guides/toc/">Table of Contents</a>
</li>
{% for group in site.data.guides %}
{% assign grp_name = group[0] %}
{% assign grp = group[1] %}
{% capture grp_url %}/guides/{{ grp_name }}/{% endcapture %}
<li class="section-menu__item{% if page.guide_group == grp_name %} open{% if page.url == grp_url %} active{% endif %}{% endif %}">
<a href="/guides/{{ grp_name }}/">
{% if grp.starred == true %} <i class="fa fa-star fa-fw"></i>{% endif %}
{{ grp.title }}
</a>
{% if page.guide_group == grp_name %}
<ul>
{% if grp.guides.size > 0 %}
{% assign group_docs = grp.guides | sort: grp.sort_by %}
{% for doc in group_docs %}
{% if doc.menu %}
<li class="section-menu__subitem{% if page.url == doc.url %} active{% endif %}">
<a href="{{ site.baseurl }}{{ doc.url }}"><span>{{ doc.title }}</span></a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div><!-- sidebar__wrapper -->
<div class="content content--section-menu">
{% include search.html %}
<div class="container">
{{content}}
</div>
</div>