зеркало из https://github.com/telerik/docs-seed.git
feat: Integrated API reference supported
This commit is contained in:
Родитель
79690c0211
Коммит
22c844c717
|
@ -1448,6 +1448,8 @@ $border-color: #d9d9d9;
|
|||
.anchor-h3 {
|
||||
margin: 5px 0;
|
||||
font-family: $font-light;
|
||||
font-size: 12px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
$(function () {
|
||||
var relatedArticlesMarker = $('h2#see-also');
|
||||
var relatedArticlesMarker = $('h2#see-also, h3#see-also');
|
||||
if (relatedArticlesMarker.length) {
|
||||
var relatedArticlesList = relatedArticlesMarker.next('ul');
|
||||
$('#related-articles').append(relatedArticlesList.html());
|
||||
|
||||
relatedArticlesMarker.remove();
|
||||
relatedArticlesList.remove();
|
||||
if (relatedArticlesList.length) {
|
||||
$('#related-articles').append(relatedArticlesList.html());
|
||||
|
||||
relatedArticlesMarker.remove();
|
||||
relatedArticlesList.remove();
|
||||
}
|
||||
} else {
|
||||
$('.related-articles').toggleClass('empty', true);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ $(function() {
|
|||
var toc = $("#toc");
|
||||
toc.empty();
|
||||
|
||||
var headings = $("#content article > h1, #content article > h2, #content article > h3");
|
||||
var headings = $("#content article > h1, #content article > h2, #content article.api-reference > h3");
|
||||
var empty = headings.length < 2;
|
||||
|
||||
articleToc.toggleClass("empty", empty);
|
||||
|
|
|
@ -20,7 +20,7 @@ layout: default
|
|||
{% render_bread_crumbs %}
|
||||
</p>
|
||||
|
||||
{% if page.api_reference == true and page.position != 1 %}
|
||||
{% if page.kind == "api" and page.position != 1 %}
|
||||
<article class="api-reference">
|
||||
{% else %}
|
||||
<article>
|
||||
|
|
|
@ -8,7 +8,7 @@ module Jekyll
|
|||
|
||||
def call()
|
||||
|
||||
doc.css('h1, h2').each do |heading|
|
||||
doc.css('h1, h2, h3').each do |heading|
|
||||
|
||||
desc_node = heading.children.first()
|
||||
if desc_node
|
||||
|
|
Загрузка…
Ссылка в новой задаче