Hello again,
As expected, I have two questions:
-
How do I make the form look more appealing than so:
-
I would have expected the saved comments to be displayed in the panel as the subpage of the respective article. But this is not the case. Did I have wrong expectations or something wrong now?
Oh, as a bonus question: The email notification doesn’t work either. This may be because I don’t know where to put the appropriate command in this file (I put it at the end.):
<?php
return [
'debug' => true,
'panel' => ['install' => true],
'sitemap.ignore' => ['error', 'search', 'home/assets'],
'languages' => false,
'smartypants' => true,
'markdown' => [
'extra' => true,
],
'thumbs' => [
'driver' => 'gd',
'quality' => 76,
'presets' => [
'xsmall' => ['width' => 300, 'quality' => 76],
'small' => ['width' => 400, 'quality' => 76],
'normal' => ['width' => 800, 'quality' => 76],
'large' => ['width' => 1200, 'quality' => 76],
'default' => ['width' => 800, 'quality' => 76],
'columns' => ['width' => 400, 'quality' => 76],
'3-2' => ['width' => 800, 'height' => 533, 'crop' => 'center', 'quality' => 76],
'16-9' => ['width' => 800, 'height' => 450, 'crop' => 'center', 'quality' => 76],
'2-1' => ['width' => 800, 'height' => 400, 'crop' => 'center', 'quality' => 76],
'3-1' => ['width' => 800, 'height' => 267, 'crop' => 'center', 'quality' => 76]
],
'srcsets' => [
'default' => [
'320w' => ['width' => 320, 'quality' => 76],
'600w' => ['width' => 600, 'quality' => 76],
'800w' => ['width' => 800, 'quality' => 76],
'1000w' => ['width' => 1000, 'quality' => 76],
'1200w' => ['width' => 1200, 'quality' => 76]
],
'small' => [
'320w' => ['width' => 320, 'quality' => 76],
'400w' => ['width' => 400, 'quality' => 76],
'600w' => ['width' => 600, 'quality' => 76]
],
'3-2' => [
'400w' => ['width' => 400, 'height' => 267, 'quality' => 76, 'crop' => 'center'],
'600w' => ['width' => 600, 'height' => 400, 'quality' => 76, 'crop' => 'center'],
'800w' => ['width' => 800, 'height' => 533, 'quality' => 76, 'crop' => 'center'],
'1000w' => ['width' => 1000, 'height' => 666, 'quality' => 76, 'crop' => 'center'],
'1200w' => ['width' => 1200, 'height' => 800, 'quality' => 76, 'crop' => 'center']
],
'16-9' => [
'400w' => ['width' => 400, 'height' => 225, 'quality' => 76, 'crop' => 'center'],
'600w' => ['width' => 600, 'height' => 338, 'quality' => 76, 'crop' => 'center'],
'800w' => ['width' => 800, 'height' => 450, 'quality' => 76, 'crop' => 'center'],
'1000w' => ['width' => 1000, 'height' => 562, 'quality' => 76, 'crop' => 'center'],
'1200w' => ['width' => 1200, 'height' => 675, 'quality' => 76, 'crop' => 'center']
],
'2-1' => [
'400w' => ['width' => 400, 'height' => 200, 'quality' => 76, 'crop' => 'center'],
'600w' => ['width' => 600, 'height' => 300, 'quality' => 76, 'crop' => 'center'],
'800w' => ['width' => 800, 'height' => 400, 'quality' => 76, 'crop' => 'center'],
'1000w' => ['width' => 1000, 'height' => 500, 'quality' => 76, 'crop' => 'center'],
'1200w' => ['width' => 1200, 'height' => 600, 'quality' => 76, 'crop' => 'center']
],
'3-1' => [
'400w' => ['width' => 400, 'height' => 134, 'quality' => 76, 'crop' => 'center'],
'600w' => ['width' => 600, 'height' => 200, 'quality' => 76, 'crop' => 'center'],
'800w' => ['width' => 800, 'height' => 267, 'quality' => 76, 'crop' => 'center'],
'1000w' => ['width' => 1000, 'height' => 334, 'quality' => 76, 'crop' => 'center'],
'1200w' => ['width' => 1200, 'height' => 400, 'quality' => 76, 'crop' => 'center']
],
],
],
'srcset-sizes' => [
'default' => '(max-width: 671px) 100vw, (max-width: 959px) 63vw, (max-width: 1260px) 65vw',
'small' => '(max-width: 671px) 400px, 600px',
],
'cache' => [
'pages' => [
'active' => false,
'ignore' => ['search']
]
],
'routes' => [
[
'pattern' => 'sitemap.xml',
'action' => function() {
$pages = site()->pages()->index();
$ignore = kirby()->option('sitemap.ignore', ['error']);
$content = snippet('sitemap', compact('pages', 'ignore'), true);
return new Kirby\Cms\Response($content, 'application/xml');
}
],
[
'pattern' => 'sitemap',
'action' => function() {
return go('sitemap.xml', 301);
}
]
],
'community.markdown-field.buttons' => [
'headlines' => [
'h2', 'h3', 'h4', 'h5', 'h6'
],
'bold',
'italic',
'code',
'strikethrough',
'divider',
'ul',
'ol',
'horizontal-rule',
'divider',
'image',
'file',
'divider',
'pagelink',
'link',
'email'
],
'community.markdown-field.font' => [
'family' => 'sans-serif',
'scaling' => false,
'size' => 'regular',
],
'community.markdown-field.blank' => true,
'community.markdown-field.invisibles' => true,
'hooks' => [
'kirbytags:before' => [
function (string $text = null, array $data = []) {
return preg_replace_callback('!<(box)>(.*)<\/(box)>!siU', function (array $matches) use ($data) {
$type = $matches[1];
$html = '<div class="' . $type . '">';
$html .= $this->kirbytext($matches[2], $data);
$html .= '</div>';
return $html;
}, $text);
},
]
]
];
c::set('comments.email.enabled', true);
c::set('comments.email.to', array('xxx@yyy.net'));