add unsubscribe and view mail on the web buttons

This commit is contained in:
isUnknown 2025-02-04 17:35:09 +01:00
parent 8bdd63afe2
commit f095954a33
20 changed files with 289 additions and 224 deletions

View file

@ -1,26 +1,28 @@
<?php
function createEmptyCategories() {
$categories = new Pages();
function createEmptyCategories()
{
$categories = new Pages();
foreach (page('textes')->categories()->split() as $categoryName) {
$category = new Page([
'slug' => Str::slug($categoryName),
'slug' => Str::slug($categoryName),
'template' => 'category',
'status' => 'listed',
'content' => [
'status' => 'listed',
'content' => [
'title' => $categoryName,
],
'children' => []
'children' => [],
]);
$categories->add($category);
}
}
return $categories;
}
function createCategories() {
function createCategories()
{
$emptyCategories = createEmptyCategories();
foreach (page('textes')->grandChildren() as $text) {
try {