1
0
mirror of synced 2026-01-03 15:05:54 -05:00
Files
docs/includes/all-articles-category.html
Emily Gould 052a540cdb Getting started category landing page (#17841)
* Start building out landing page in index file

* Add articles

* Add a couple more popular articles

* Tweak intro to cover more audiences

* Add TOC back with new organization

* Update content/github/getting-started-with-github/index.md

* Category as product guides section

* Update breadcrumbs.js

* Update server.js

* Update product-landing.html

* Remove TOC listing

* Revert removing TOC

* Update index.md

* Update index.md

* Update content/github/getting-started-with-github/index.md

* Apply suggestions from code review

Co-authored-by: Laura Coursen <lecoursen@github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
2021-03-09 10:04:45 -06:00

33 lines
1.3 KiB
HTML

{% assign category = siteTree[currentLanguage][currentVersion].products[currentProduct].categories[currentPath] %}
{% assign maxArticles = 10 %}
<div class="py-6 all-articles-list">
<h2 class="font-mktg mb-4">{{ category.title }} docs</h2>
<div class="d-flex gutter flex-wrap">
{% for xmaptopic in category.maptopics %}
{% assign maptopic = xmaptopic[1] %}
{% unless maptopic.hidden %}
<div class="col-12 col-lg-4 mb-6 height-full">
<h4 class="mb-3"><a href="{{ maptopic.href }}">{{ maptopic.title }}</a></h4>
<ul class="list-style-none">
{% for xarticle in maptopic.articles %}
{% assign article = xarticle[1] %}
<li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}">
<a href="{{ article.href }}">
{{ article.title }}
</a>
</li>
{% endfor %}
{% assign numArticles = maptopic.childArticles | obj_size %}
{% if numArticles > maxArticles %}
<button class="js-all-articles-show-more btn-link link-gray">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
{% endif %}
</ul>
</div>
{% endunless %}
{% endfor %}
</div>
</div>