Вывод картинки поста и описания в боковой панели
All checks were successful
Build and deploy mmote.ru / Build-And-Deploy (push) Successful in 22s
All checks were successful
Build and deploy mmote.ru / Build-And-Deploy (push) Successful in 22s
This commit is contained in:
parent
b48d98b067
commit
1f80adaf1f
@ -45,14 +45,19 @@
|
||||
"type": "categories"
|
||||
},
|
||||
{
|
||||
"title": "featured_image",
|
||||
"name": "Thumbnail",
|
||||
"title": "Thumbnail",
|
||||
"name": "featured_image",
|
||||
"type": "image"
|
||||
},
|
||||
{
|
||||
"title": "lastmod",
|
||||
"name": "Last modified",
|
||||
"title": "Last modified",
|
||||
"name": "lastmod",
|
||||
"type": "datetime"
|
||||
},
|
||||
{
|
||||
"title": "Telegram Entry ID (channel/id)",
|
||||
"name": "telegram_entry_id",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -204,6 +204,8 @@ section.posts {
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin-top: 1em;
|
||||
|
||||
ul {
|
||||
list-style-position: inside;
|
||||
margin: 0;
|
||||
@ -224,6 +226,10 @@ section.posts {
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,21 @@
|
||||
<section class="sidebar">
|
||||
|
||||
{{ if .IsPage }}
|
||||
<div class="item">
|
||||
<h4>Будь осторожен!</h4>
|
||||
<p>
|
||||
Это минимальный набор всего,
|
||||
чтобы начать работать с сайтом.
|
||||
</p>
|
||||
<p>
|
||||
Согласен, лучше не стало. Но всё ещё впереди.
|
||||
</p>
|
||||
</div>
|
||||
{{- $thumb := .Page.Resources.Get .Params.featured_image -}}
|
||||
{{if $thumb}}
|
||||
<img class="thumb" alt="thumb" src="{{ ($thumb.Fit "300x300").RelPermalink }}">
|
||||
{{end}}
|
||||
|
||||
{{ with .Description }}
|
||||
<div>{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if strings.Contains .TableOfContents "li" }}
|
||||
<div class="item">
|
||||
<h4>Содержание</h4>
|
||||
<div class="toc">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user