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

81 lines
2.5 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: default
menu_section: blog
---
<div class="container">
<div class="row">
<div class="col-l-8">
{% include utils/toc_small.html toc=page.toc %}
<div class="hidden-l">
{% include blog/buttons.html %}
</div>
{{ content }}
</div>
<div class="col-l-4">
<div class="gray-box gray-box--fixed gray-box--scrollspy">
{% include blog/buttons.html %}
{% include utils/toc_large.html toc=page.toc %}
<h3>Categories</h3>
<ul>
<li>
<a href="{{ site.baseurl }}/blog/">
{% if page.tag == "all" %}
<strong>All Posts</strong>
{% else %}
All Posts
{% endif %}
</a>
</li>
{% assign sorted_tags = site.tags | hash_sort %}
{% for tag in sorted_tags %}
<li>
<a href="{{ site.baseurl }}/blog/tags/{{ tag | first | slugize }}/">
{% if page.tags contains tag[0] or page.tag == tag[0] %}
<strong>{{ tag[0] }}</strong>
{% else %}
{{ tag[0] }}
{% endif %}
</a>
</li>
{% endfor %}
</ul>
<h3>Authors</h3>
<ul>
{% assign sorted_authors = site.data.authors | hash_sort: 'num_posts' %}
{% for author in sorted_authors reversed %}
<li>
<a href="{{ site.baseurl }}/blog/authors/{{ author | first | slugize }}/">
{% if author[0] == page.author %}
<strong>{{ author[1].name }}</strong>
{% else %}
{{ author[1].name }}
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
<div id="modal-newsletter" class="hidden">
{% include blog/newsletter.html %}
</div>