mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 03:56:21 +05:30
Forgot the search page (post class)
Missing the first and last class for search page.
This commit is contained in:
parent
d5e6973e82
commit
4149ca4c2c
1 changed files with 12 additions and 0 deletions
|
|
@ -424,6 +424,18 @@ function get_keyword($keyword){
|
|||
$arr = explode('</h1>', $content);
|
||||
$post->title = str_replace('<h1>','',$arr[0]);
|
||||
$post->body = $arr[1];
|
||||
|
||||
// Get first and last post
|
||||
if ($index == 0) {
|
||||
$post->cls = 'item first';
|
||||
}
|
||||
elseif ($index == count($posts) - 1) {
|
||||
$post->cls = 'item last';
|
||||
}
|
||||
else {
|
||||
$post->cls = 'item';
|
||||
}
|
||||
|
||||
$tmp[] = $post;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue