Вывод содержания в боковой панели
All checks were successful
Build and deploy mmote.ru / Build-And-Deploy (push) Successful in 1m51s
All checks were successful
Build and deploy mmote.ru / Build-And-Deploy (push) Successful in 1m51s
This commit is contained in:
parent
ed2238d5a6
commit
b48d98b067
@ -43,6 +43,16 @@
|
||||
"title": "Categories",
|
||||
"name": "categories",
|
||||
"type": "categories"
|
||||
},
|
||||
{
|
||||
"title": "featured_image",
|
||||
"name": "Thumbnail",
|
||||
"type": "image"
|
||||
},
|
||||
{
|
||||
"title": "lastmod",
|
||||
"name": "Last modified",
|
||||
"type": "datetime"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -54,4 +64,4 @@
|
||||
"filePrefix": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -203,7 +203,18 @@ section.posts {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
ul {
|
||||
.toc {
|
||||
ul {
|
||||
list-style-position: inside;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul ul {
|
||||
padding-left: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.categories ul {
|
||||
list-style-type: "- ";
|
||||
list-style-position: inside;
|
||||
padding: 0;
|
||||
|
@ -10,13 +10,25 @@
|
||||
Согласен, лучше не стало. Но всё ещё впереди.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{ if strings.Contains .TableOfContents "li" }}
|
||||
<div class="item">
|
||||
<h4>Содержание</h4>
|
||||
<div class="toc">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="item">
|
||||
<h4>Категории</h4>
|
||||
<ul>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> {{/* .Count */}}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<div class="categories">
|
||||
<ul>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> {{/* .Count */}}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user