|
|
@ -394,7 +394,7 @@ get('/front/edit', function () { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Show the "Add post" page
|
|
|
|
|
|
|
|
|
// Show the "Add content" page
|
|
|
get('/add/content', function () { |
|
|
get('/add/content', function () { |
|
|
|
|
|
|
|
|
$req = $_GET['type']; |
|
|
$req = $_GET['type']; |
|
|
@ -412,7 +412,7 @@ get('/add/content', function () { |
|
|
'type' => $type, |
|
|
'type' => $type, |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'add-content', |
|
|
'bodyclass' => 'add-content', |
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add post' |
|
|
|
|
|
|
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add content' |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
$login = site_url() . 'login'; |
|
|
$login = site_url() . 'login'; |
|
|
@ -794,7 +794,7 @@ get('/add/category', function () { |
|
|
'type' => 'is_category', |
|
|
'type' => 'is_category', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'add-category', |
|
|
'bodyclass' => 'add-category', |
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add page' |
|
|
|
|
|
|
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add category' |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
$login = site_url() . 'login'; |
|
|
$login = site_url() . 'login'; |
|
|
@ -841,7 +841,7 @@ post('/add/category', function () { |
|
|
'type' => 'is_category', |
|
|
'type' => 'is_category', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'add-category', |
|
|
'bodyclass' => 'add-category', |
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add page' |
|
|
|
|
|
|
|
|
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Add category' |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -1973,7 +1973,7 @@ get('/post/:name', function ($name) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (config('blog.enable') === 'true') { |
|
|
if (config('blog.enable') === 'true') { |
|
|
$blog = ' <span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . 'blog">Blog</a></span> » '; |
|
|
|
|
|
|
|
|
$blog = '<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a itemprop="item" href="' . site_url() . 'blog"><span itemprop="name">Blog</span></a><meta itemprop="position" content="2" /></li> » '; |
|
|
} else { |
|
|
} else { |
|
|
$blog = ''; |
|
|
$blog = ''; |
|
|
} |
|
|
} |
|
|
@ -2010,7 +2010,7 @@ get('/post/:name', function ($name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'author' => $author, |
|
|
'author' => $author, |
|
|
'bodyclass' => 'in-post category-' . $current->ct . ' type-' . $current->type, |
|
|
'bodyclass' => 'in-post category-' . $current->ct . ' type-' . $current->type, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » '. $blog . '<span typeof="v:Breadcrumb">' . $current->categoryb . '</span>' . ' » ' . $current->title, |
|
|
|
|
|
|
|
|
'breadcrumb' => '<style>.breadcrumb-list {margin:0; padding:0;} .breadcrumb-list li {display: inline-block; list-style: none;}</style><ol class="breadcrumb-list" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a itemprop="item" href="' . site_url() . '"><span itemprop="name">' . config('breadcrumb.home') . '</span></a><meta itemprop="position" content="1" /></li> » '. $blog . '<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">' . $current->categoryb . '<meta itemprop="position" content="3" /></li>' . ' » ' . $current->title . '</ol>', |
|
|
'prev' => has_prev($prev), |
|
|
'prev' => has_prev($prev), |
|
|
'next' => has_next($next), |
|
|
'next' => has_next($next), |
|
|
'type' => $var, |
|
|
'type' => $var, |
|
|
@ -2062,7 +2062,7 @@ get('/post/:name/edit', function ($name) { |
|
|
'type' => $type, |
|
|
'type' => $type, |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'edit-post', |
|
|
'bodyclass' => 'edit-post', |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
render('denied', array( |
|
|
render('denied', array( |
|
|
@ -2072,7 +2072,7 @@ get('/post/:name/edit', function ($name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'bodyclass' => 'denied', |
|
|
'bodyclass' => 'denied', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
@ -2254,7 +2254,7 @@ get('/post/:name/delete', function ($name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'delete-post', |
|
|
'bodyclass' => 'delete-post', |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
render('denied', array( |
|
|
render('denied', array( |
|
|
@ -2264,7 +2264,7 @@ get('/post/:name/delete', function ($name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'bodyclass' => 'delete-post', |
|
|
'bodyclass' => 'delete-post', |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
@ -2957,7 +2957,7 @@ get('/:year/:month/:name', function ($year, $month, $name) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (config('blog.enable') === 'true') { |
|
|
if (config('blog.enable') === 'true') { |
|
|
$blog = ' <span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . 'blog">Blog</a></span> » '; |
|
|
|
|
|
|
|
|
$blog = '<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a itemprop="item" href="' . site_url() . 'blog"><span itemprop="name">Blog</span></a><meta itemprop="position" content="2" /></li> » '; |
|
|
} else { |
|
|
} else { |
|
|
$blog = ''; |
|
|
$blog = ''; |
|
|
} |
|
|
} |
|
|
@ -2994,7 +2994,7 @@ get('/:year/:month/:name', function ($year, $month, $name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'author' => $author, |
|
|
'author' => $author, |
|
|
'bodyclass' => 'in-post category-' . $current->ct . ' type-' . $current->type, |
|
|
'bodyclass' => 'in-post category-' . $current->ct . ' type-' . $current->type, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » '. $blog . '<span typeof="v:Breadcrumb">' . $current->categoryb . '</span>' . ' » ' . $current->title, |
|
|
|
|
|
|
|
|
'breadcrumb' => '<style>.breadcrumb-list {margin:0; padding:0;} .breadcrumb-list li {display: inline-block; list-style: none;}</style><ol class="breadcrumb-list" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a itemprop="item" href="' . site_url() . '"><span itemprop="name">' . config('breadcrumb.home') . '</span></a><meta itemprop="position" content="1" /></li> » '. $blog . '<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">' . $current->categoryb . '<meta itemprop="position" content="3" /></li>' . ' » ' . $current->title . '</ol>', |
|
|
'prev' => has_prev($prev), |
|
|
'prev' => has_prev($prev), |
|
|
'next' => has_next($next), |
|
|
'next' => has_next($next), |
|
|
'type' => $var, |
|
|
'type' => $var, |
|
|
@ -3046,7 +3046,7 @@ get('/:year/:month/:name/edit', function ($year, $month, $name) { |
|
|
'type' => $type, |
|
|
'type' => $type, |
|
|
'bodyclass' => 'edit-post', |
|
|
'bodyclass' => 'edit-post', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
render('denied', array( |
|
|
render('denied', array( |
|
|
@ -3056,7 +3056,7 @@ get('/:year/:month/:name/edit', function ($year, $month, $name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'bodyclass' => 'denied', |
|
|
'bodyclass' => 'denied', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
@ -3238,7 +3238,7 @@ get('/:year/:month/:name/delete', function ($year, $month, $name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'bodyclass' => 'delete-post', |
|
|
'bodyclass' => 'delete-post', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} else { |
|
|
} else { |
|
|
render('denied', array( |
|
|
render('denied', array( |
|
|
@ -3248,7 +3248,7 @@ get('/:year/:month/:name/delete', function ($year, $month, $name) { |
|
|
'p' => $current, |
|
|
'p' => $current, |
|
|
'bodyclass' => 'delete-post', |
|
|
'bodyclass' => 'delete-post', |
|
|
'is_admin' => true, |
|
|
'is_admin' => true, |
|
|
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
|
|
|
|
|
|
'breadcrumb' => '<span><a href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|