├── .gitignore ├── content ├── 1-archive │ └── archive.txt ├── 2-about │ └── default.txt ├── error │ └── error.txt ├── posts │ └── posts.txt ├── search │ └── search.txt └── site.txt ├── readme.md └── site ├── blueprints ├── archive.php ├── default.php ├── error.php ├── post.php ├── posts.php ├── search.php └── site.php ├── cache └── index.html ├── config └── config.php ├── controllers ├── archive.php ├── index.html ├── post.php ├── posts.php └── search.php ├── plugins ├── helpers.php ├── index.html └── tagcloud.php ├── snippets ├── archive-authors.php ├── archive-categories.php ├── archive-dates.php ├── archive-tags.php ├── archives.php ├── footer.php ├── header.php ├── nav-main.php ├── nav-pager.php ├── nav-pagination.php ├── post-footer.php └── search.php └── templates ├── archive.php ├── default.php ├── post.php ├── posts.php └── search.php /.gitignore: -------------------------------------------------------------------------------- 1 | site/accounts 2 | -------------------------------------------------------------------------------- /content/1-archive/archive.txt: -------------------------------------------------------------------------------- 1 | Title: Archive 2 | 3 | ---- 4 | 5 | Noposts: Sorry, no posts found… -------------------------------------------------------------------------------- /content/2-about/default.txt: -------------------------------------------------------------------------------- 1 | Title: About 2 | 3 | ---- 4 | 5 | Text: This is me! -------------------------------------------------------------------------------- /content/error/error.txt: -------------------------------------------------------------------------------- 1 | Title: Error 2 | 3 | ---- 4 | 5 | Text: The page has not been found. -------------------------------------------------------------------------------- /content/posts/posts.txt: -------------------------------------------------------------------------------- 1 | Title: Posts -------------------------------------------------------------------------------- /content/search/search.txt: -------------------------------------------------------------------------------- 1 | Title: Search 2 | 3 | ---- 4 | 5 | Noposts: Sorry, the search did not find any Posts. 6 | 7 | ---- 8 | 9 | Resulttitle: Searchresult for 10 | 11 | ---- 12 | 13 | Nosearch: There is nothing to search for… -------------------------------------------------------------------------------- /content/site.txt: -------------------------------------------------------------------------------- 1 | Title: blogprint - a blueprint for blogs with kirby 2 | 3 | ---- 4 | 5 | Author: John Doe 6 | 7 | ---- 8 | 9 | Description: [blogprint](https://github.com/ausminternet/blogprint) is a theme for the awesome [kirby](http://getkirby.com/) CMS, to kickstart a blog. It is fully functional but without any styling - only semantic markup is provided. 10 | 11 | ---- 12 | 13 | Keywords: kirby,cms,blogprint,theme,blog 14 | 15 | ---- 16 | 17 | Copyright: © 2009-(date: Year) 18 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # blogprint - a blueprint for blogs with kirby 2 | 3 | **blogprint** is a theme for the awesome [kirby](http://getkirby.com/) CMS, to kickstart a blog. It provides all basic features you need for a fully functional blog, but without any styling - only semantic markup is provided. 4 | 5 | ## Features: 6 | - General 7 | - Pagination 8 | - Search (whole site or just the pages) 9 | - Posts: 10 | - Title 11 | - Date 12 | - Tags 13 | - Categories 14 | - Covereimage 15 | - Author 16 | - Avatar 17 | - next/prev links 18 | - Archive (each with count): 19 | - Years 20 | - Years and Month 21 | - Tags 22 | - Catgeories 23 | - Authors 24 | 25 | If the archive is opened without any arguments, it will list all articles seperated by year without the text. 26 | 27 | There is also a main menu which will show all visible first-level-pages and their visible children (except children for 'posts' - which is not visible on default) to add additional pages to the blog. 28 | 29 | ## Configuration: 30 | 31 | You can control some stuff in ```site/config/config.php```: 32 | 33 | ```c::set('pagination-posts', 10);```: number of posts per page 34 | 35 | 36 | ```c::set('pagination-archive', 30);```: number of posts per archive page 37 | 38 | 39 | ```c::set('pagination-search', 30);```: number of posts per search page 40 | 41 | 42 | ## Special snippets: 43 | 44 | ### post-footer.php 45 | 46 | **Description:** 47 | 48 | This snippet can list all metadata like date, author, tags and categories for a given post. 49 | 50 | **Options:** 51 | 52 | - post => $post 53 | - date => true/false (default: true) 54 | - author => true/false (default: false) 55 | - avatar => true/false (default: false) 56 | - tags => true/false (default: false) 57 | - category => true/false (default: false) 58 | - class => string/false (default: false) 59 | 60 | **Usage:** 61 | 62 | ``` 63 | $post, 64 | 'author' => true, 65 | 'avatar' => true, 66 | 'tags' => true, 67 | 'category' => true, 68 | 'class' => 'my-class')) ?> 69 | ``` 70 | 71 | ### archives.php 72 | 73 | **Description:** 74 | 75 | This snippet can list archives for dates, authors, tags and categories for all posts. 76 | 77 | **Options:** 78 | 79 | - dates => true/false (default: false) 80 | - authors => true/false (default: false) 81 | - tags => true/false (default: false) 82 | - categories => true/false (default: false) 83 | - class => string/false (default: false) 84 | 85 | **Usage:** 86 | 87 | ``` 88 | true, 89 | 'authors' => true, 90 | 'tags' => true, 91 | 'categories' => true, 92 | 'class' => 'my-class')) ?> 93 | ``` 94 | 95 | ## helpful functions: 96 | 97 | ### getPostUrl( $post ) 98 | 99 | Returns the wordpress-style-url for a given post. 100 | 101 | ### getAuthorName( $username ) 102 | 103 | Returns the first- and lastname for a given username. 104 | If no firstname is available, then the username will be returned. 105 | The lastname will only be used, if a firstname is available. 106 | 107 | ### getCoverImage( $post ) 108 | 109 | Returns the coverimage-img-tag for a given post, if a coverimage is available. 110 | If no coverimage is available, it will return *false*. 111 | 112 | ## Routing: 113 | 114 | All posts are located under ```/posts```, but this folder will be ommited in all urls. 115 | 116 | ### Post URLs: 117 | All links are in Wordpress-style: ```/year/month/day/post-title``` (for example: ```http://blog.dev/2014/12/24/lorem-ipsum ```) and will be automaticaly routed to ```/posts/post-title``` internaly. 118 | 119 | ### Archive URLs: 120 | 121 | Archive for: 122 | 123 | - year: ```/$year/``` 124 | - month: ```/$year/$month/``` 125 | - day: ```/$year/$month/$day/``` 126 | - tags: ```/tag/$tag/``` 127 | - categories: ```/category/$category/``` 128 | - authors: ```/author/$author/``` 129 | 130 | ## TODO: 131 | 132 | - add feed 133 | - make translatable, when Bug https://github.com/getkirby/kirby/issues/156 is fixed 134 | - add disqus 135 | - make blogprint foundation-ready 136 | - make blogprint bootstrap-ready 137 | -------------------------------------------------------------------------------- /site/blueprints/archive.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Search 4 | pages: false 5 | files: false 6 | fields: 7 | title: 8 | label: Title 9 | type: text 10 | noposts: 11 | label: No posts found 12 | type: textarea 13 | -------------------------------------------------------------------------------- /site/blueprints/default.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Page 4 | pages: true 5 | files: true 6 | fields: 7 | title: 8 | label: Title 9 | type: text 10 | text: 11 | label: Text 12 | type: textarea -------------------------------------------------------------------------------- /site/blueprints/error.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Error 4 | pages: false 5 | files: false 6 | fields: 7 | title: 8 | label: Title 9 | type: text 10 | text: 11 | label: Text 12 | type: textarea 13 | size: large -------------------------------------------------------------------------------- /site/blueprints/post.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Post 4 | pages:false 5 | files: 6 | sortable:true 7 | fields: 8 | title: 9 | label: Title 10 | type: text 11 | date: 12 | label: Datum 13 | type: date 14 | default: today 15 | width: 1/2 16 | author: 17 | label: Author 18 | type: user 19 | width: 1/2 20 | coverimage: 21 | label: Coverimage 22 | type: select 23 | options: images 24 | width: 1/2 25 | category: 26 | label: Category 27 | type: select 28 | width: 1/2 29 | options: 30 | general: general 31 | stuff: stuff 32 | tags: 33 | label: Tags 34 | type: tags 35 | lowercase: true 36 | text: 37 | label: Text 38 | type: textarea 39 | requiered: true 40 | 41 | 42 | -------------------------------------------------------------------------------- /site/blueprints/posts.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Posts 4 | pages: 5 | template: post 6 | num: date 7 | sort: flip 8 | files: false 9 | fields: 10 | title: 11 | label: Title 12 | type: text 13 | -------------------------------------------------------------------------------- /site/blueprints/search.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Archive 4 | pages: false 5 | files: false 6 | fields: 7 | title: 8 | label: Title 9 | type: text 10 | nosearch: 11 | label: No search 12 | type: textarea 13 | resulttitle: 14 | label: Resulttitle 15 | type: text 16 | noposts: 17 | label: No results 18 | type: textarea 19 | 20 | -------------------------------------------------------------------------------- /site/blueprints/site.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | title: Site 4 | pages: true 5 | fields: 6 | title: 7 | label: Title 8 | type: text 9 | author: 10 | label: Author 11 | type: text 12 | description: 13 | label: Description 14 | type: textarea 15 | keywords: 16 | label: Keywords 17 | type: tags 18 | copyright: 19 | label: Copyright 20 | type: textarea 21 | -------------------------------------------------------------------------------- /site/cache/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ausminternet/blogprint/a8a5a0d39764c95fc003c09136b9bb8baacf485d/site/cache/index.html -------------------------------------------------------------------------------- /site/config/config.php: -------------------------------------------------------------------------------- 1 | 'category/(:any)', 51 | 'action' => function($category) { 52 | 53 | $data = array('category' => $category); 54 | 55 | return array('archive', $data); 56 | } 57 | ), 58 | array( 59 | 'pattern' => 'author/(:any)', 60 | 'action' => function($author) { 61 | 62 | $data = array('author' => $author); 63 | 64 | return array('archive', $data); 65 | } 66 | ), 67 | array( 68 | 'pattern' => 'tag/(:any)', 69 | 'action' => function($tag) { 70 | 71 | $data = array('tag' => $tag); 72 | 73 | return array('archive', $data); 74 | 75 | } 76 | ), 77 | array( 78 | 'pattern' => '(:num)/(:num)/(:num)/(:any)', 79 | 'action' => function($year, $month, $day, $uid) { 80 | 81 | $page = page('posts/' . $uid); 82 | if(!$page){ 83 | $page = site()->errorPage(); 84 | } else { 85 | if(($page->date('Y') != $year) 86 | || ($page->date('m') != $month) 87 | || ($page->date('d') != $day)) { 88 | $page = site()->errorPage(); 89 | } 90 | } 91 | return site()->visit($page); 92 | } 93 | ), 94 | array( 95 | 'pattern' => '(:num)/(:num)/(:num)', 96 | 'action' => function($year, $month, $day) { 97 | 98 | if(($year > 0 && $year <= 9999) 99 | && ($month > 0 && $month <= 12) 100 | && ($day > 0 && $day <= 31)) { 101 | $data = array('year' => $year, 102 | 'month' => $month, 103 | 'day' => $day); 104 | return array('archive', $data); 105 | } else { 106 | go('error'); 107 | } 108 | } 109 | ), 110 | array( 111 | 'pattern' => '(:num)/(:num)', 112 | 'action' => function($year, $month) { 113 | 114 | if(($year > 0 && $year <= 9999) 115 | && ($month > 0 && $month <= 12)) { 116 | $data = array('year' => $year, 117 | 'month' => $month); 118 | return array('archive', $data); 119 | } else { 120 | go('error'); 121 | } 122 | } 123 | ), 124 | array( 125 | 'pattern' => '(:num)', 126 | 'action' => function($year) { 127 | if($year > 0 && $year <= 9999) { 128 | $data = array('year' => $year); 129 | return array('archive', $data); 130 | } else { 131 | go('error'); 132 | } 133 | } 134 | ) 135 | )); 136 | -------------------------------------------------------------------------------- /site/controllers/archive.php: -------------------------------------------------------------------------------- 1 | find('posts')->children() 7 | ->visible() 8 | ->flip(); 9 | 10 | $archiveTitle = null; 11 | 12 | // filter by author 13 | if(isset($data['author'])) { 14 | $author = urldecode($data['author']); 15 | $posts = $posts->filterBy('author', $author); 16 | $archiveTitle = ' for author "' 17 | . getAuthorName($author) 18 | . ' (' . $author . ')"'; 19 | } 20 | 21 | // filter by tag 22 | if(isset($data['tag'])) { 23 | $tag = urldecode($data['tag']); 24 | $posts = $posts->filterBy('tags', $tag, ','); 25 | $archiveTitle = ' for tag "' . $tag . '"'; 26 | } 27 | 28 | // filter by category 29 | if(isset($data['category'])) { 30 | $category = urldecode($data['category']); 31 | $posts = $posts->filterBy('category', $category); 32 | $archiveTitle = ' for category "' . $category . '"'; 33 | } 34 | 35 | // filter by year 36 | if(isset($data['year'])) { 37 | $year = $data['year']; 38 | $postsYear = new Pages; 39 | foreach ($posts as $a) { 40 | if($a->date('Y') == $year) $postsYear->add($a); 41 | } 42 | $archiveTitle = ' for ' . $year; 43 | $posts = $postsYear; 44 | 45 | // filter by month 46 | if(isset($data['month'])) { 47 | $month = $data['month']; 48 | $postsMonth = new Pages; 49 | foreach ($postsYear as $a) { 50 | if($a->date('m') == $month) $postsMonth->add($a); 51 | } 52 | 53 | // get month-name from number 54 | $dateObj = DateTime::createFromFormat('!m', $month); 55 | $monthName = $dateObj->format('F'); // March 56 | 57 | $archiveTitle = ' for ' . $monthName . ' ' . $year; 58 | $posts = $postsMonth; 59 | 60 | // filter by day 61 | if(isset($data['day'])) { 62 | $day = $data['day']; 63 | $postsDay = new Pages; 64 | foreach ($postsMonth as $a) { 65 | if($a->date('d') == $day) $postsDay->add($a); 66 | } 67 | $archiveTitle = ' for ' . $day . '. ' . $monthName . ' ' . $year; 68 | $posts = $postsDay; 69 | } 70 | } 71 | } 72 | 73 | // add pagination 74 | $posts = $posts->paginate(c::get('pagination-archive')); 75 | $pagination = $posts->pagination(); 76 | 77 | //pass all variables to the template 78 | return compact('posts', 'archiveTitle', 'data', 'pagination', 'year'); 79 | 80 | }; 81 | 82 | ?> 83 | -------------------------------------------------------------------------------- /site/controllers/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ausminternet/blogprint/a8a5a0d39764c95fc003c09136b9bb8baacf485d/site/controllers/index.html -------------------------------------------------------------------------------- /site/controllers/post.php: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /site/controllers/posts.php: -------------------------------------------------------------------------------- 1 | children() 7 | ->visible() 8 | ->flip(); 9 | 10 | // add pagination 11 | $posts = $posts->paginate(c::get('pagination-posts')); 12 | $pagination = $posts->pagination(); 13 | 14 | // pass all variables to the template 15 | return compact('posts', 'pagination'); 16 | 17 | }; 18 | 19 | ?> 20 | -------------------------------------------------------------------------------- /site/controllers/search.php: -------------------------------------------------------------------------------- 1 | search($query, array('words' => true)) 14 | ->visible(); 15 | break; 16 | 17 | default: 18 | $results = $site->find('posts') 19 | ->search($query, array('words' => true)) 20 | ->visible(); 21 | break; 22 | } 23 | 24 | // add pagination 25 | $results = $results->paginate(c::get('pagination-search')); 26 | $pagination = $results->pagination(); 27 | } 28 | 29 | 30 | //pass all variables to the template 31 | return compact('results', 'query'); 32 | 33 | }; 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /site/plugins/helpers.php: -------------------------------------------------------------------------------- 1 | url(); 15 | $uri .= '/' . $post->date('Y') 16 | . '/' . $post->date('m') 17 | . '/' . $post->date('d') 18 | . '/' . $post->slug(); 19 | 20 | return $uri; 21 | } 22 | 23 | /** 24 | * getAuthorName() 25 | * 26 | * Returns the full name of a given author instead of the username. 27 | * 28 | * @param string $username 29 | * @return string 30 | */ 31 | function getAuthorName($username) { 32 | $site = site(); 33 | $author = $site->users()->get($username); 34 | $name = $username; 35 | 36 | if($author) { 37 | if($author->firstname()) { 38 | $name = $author->firstname(); 39 | if($author->lastname()){ 40 | $name .= ' ' . $author->lastname(); 41 | } 42 | } 43 | } 44 | 45 | return $name; 46 | } 47 | 48 | /** 49 | * getCoverImage() 50 | * 51 | * Returns an img-element with the coverimage for a given post if exists. 52 | * 53 | * @param mixed $post 54 | * @return string 55 | */ 56 | function getCoverImage($post) { 57 | 58 | $coverimage = (string)$post->coverimage(); 59 | 60 | if($coverimage != "") { 61 | $img = brick('img'); 62 | $img->attr('src', $post->image($coverimage)->url()); 63 | $img->attr('alt', $post->title()->html()); 64 | 65 | return $img; 66 | } 67 | } 68 | 69 | /** 70 | * getDatesArchive() 71 | * 72 | * Returns all years and months where posts exists. 73 | * 74 | * @return array 75 | */ 76 | function getDatesArchive() { 77 | $site = site(); 78 | $posts = $site->find('posts')->children()->visible(); 79 | 80 | if($posts->count() > 0) { 81 | foreach ($posts as $post) { 82 | $year = $post->date('Y'); 83 | $month = $post->date('m'); 84 | if(isset($dates[$year][$month])) { 85 | $dates[$year][$month] += 1; 86 | } else { 87 | $dates[$year][$month] = 1; 88 | } 89 | } 90 | return $dates; 91 | } 92 | } 93 | 94 | /** 95 | * getTagsArchive() 96 | * 97 | * Returns tagcloud. 98 | * 99 | * @return array 100 | */ 101 | function getTagsArchive() { 102 | return tagcloud(page('posts'), array('field' => 'tags', 103 | 'param' => 'tag', 104 | 'baseurl' => '')); 105 | } 106 | 107 | /** 108 | * getTagsArchive() 109 | * 110 | * Returns categorycloud. 111 | * 112 | * @return array 113 | */ 114 | function getCategoriesArchive() { 115 | return tagcloud(page('posts'), array('field' => 'category', 116 | 'param' => 'category', 117 | 'baseurl' => '')); 118 | } 119 | 120 | /** 121 | * getAuthorsArchive() 122 | * 123 | * Returns authorcloud. 124 | * 125 | * @return array 126 | */ 127 | function getAuthorsArchive() { 128 | return tagcloud(page('posts'), array('field' => 'author', 129 | 'param' => 'author', 130 | 'baseurl' => '')); 131 | } 132 | ?> 133 | -------------------------------------------------------------------------------- /site/plugins/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ausminternet/blogprint/a8a5a0d39764c95fc003c09136b9bb8baacf485d/site/plugins/index.html -------------------------------------------------------------------------------- /site/plugins/tagcloud.php: -------------------------------------------------------------------------------- 1 | 7 | * @version 2.0.0 8 | * 9 | * Modified by Jan Hofmann : 10 | * make $ds always '/' 11 | */ 12 | function tagcloud($parent, $options = array()) { 13 | 14 | // default values 15 | $defaults = array( 16 | 'limit' => false, 17 | 'field' => 'tags', 18 | 'children' => 'visible', 19 | 'baseurl' => $parent->url(), 20 | 'param' => 'tag', 21 | 'sort' => 'results', 22 | 'sortdir' => 'desc' 23 | ); 24 | 25 | // merge defaults and options 26 | $options = array_merge($defaults, $options); 27 | 28 | switch($options['children']) { 29 | case 'invisible': 30 | $children = $parent->children()->invisible(); 31 | break; 32 | case 'visible': 33 | $children = $parent->children()->visible(); 34 | break; 35 | default: 36 | $children = $parent->children(); 37 | break; 38 | } 39 | 40 | $tags = $children->pluck($options['field'], ','); 41 | $tags = array_count_values($tags); 42 | $cloud = array(); 43 | //$ds = DS == '/' ? ':' : ';'; 44 | $ds = '/'; 45 | 46 | foreach($tags as $tag => $count) { 47 | 48 | $cloud[$tag] = new Obj(array( 49 | 'results' => $count, 50 | 'name' => $tag, 51 | 'url' => $options['baseurl'] . '/' . $options['param'] . $ds . urlencode($tag), 52 | 'isActive' => urldecode(param($options['param'])) == $tag 53 | )); 54 | 55 | } 56 | 57 | $cloud = new Collection($cloud); 58 | $cloud = $cloud->sortBy($options['sort'], $options['sortdir']); 59 | 60 | if($options['limit']) { 61 | $cloud = $cloud->limit($options['limit']); 62 | } 63 | 64 | return $cloud; 65 | 66 | } 67 | 68 | ?> 69 | -------------------------------------------------------------------------------- /site/snippets/archive-authors.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Authors:

4 |
5 | count() > 0): ?> 8 | 17 | 18 |

No authors found.

19 | 20 |
21 | -------------------------------------------------------------------------------- /site/snippets/archive-categories.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Categories:

4 |
5 | count() > 0): ?> 8 | 17 | 18 |

No categories found.

19 | 20 |
21 | -------------------------------------------------------------------------------- /site/snippets/archive-dates.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
> 6 |
7 |

Dates:

8 |
9 | 10 | 31 | 32 |

No dates found.

33 | 34 |
35 | -------------------------------------------------------------------------------- /site/snippets/archive-tags.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tags:

4 |
5 | count() > 0): ?> 8 | 17 | 18 |

No tags found.

19 | 20 |
21 | -------------------------------------------------------------------------------- /site/snippets/archives.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
> 10 |
11 |

Archive options:

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /site/snippets/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /site/snippets/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <?= $site->title()->html() ?> | <?= $page->title()->html() ?> 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | title()->html() ?> 17 |

18 | 19 | 20 | 21 | 22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /site/snippets/nav-main.php: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /site/snippets/nav-pager.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /site/snippets/nav-pagination.php: -------------------------------------------------------------------------------- 1 | hasPages()): ?> 2 | 3 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /site/snippets/post-footer.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
> 11 | 12 | 13 |
14 | 18 |
19 | 20 | 21 | author() != ""): ?> 22 |
23 | Author: 24 | 25 | author()) ?> 26 | 27 |
28 | 29 | 30 | author() != ""): ?> 31 | user((string)$post->author())->avatar()): ?> 32 |
33 | Avatar: 34 | <?= getAuthorName((string)$post->author()) ?>'s avatar 36 |
37 | 38 | 39 | 40 | tags() != ""): ?> 41 |
42 | Tags: 43 |
    44 | tags()->split(',') as $tag): ?> 45 |
  • 46 | 47 | 48 | 49 |
  • 50 | 51 |
52 |
53 | 54 | 55 | category() != ""): ?> 56 |
57 | Category: 58 | 61 | category()->html() ?> 62 | 63 |
64 | 65 | 66 |
67 | -------------------------------------------------------------------------------- /site/snippets/search.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 7 | 8 |
9 | -------------------------------------------------------------------------------- /site/templates/archive.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 |

Archive:

7 |
8 | 9 | count()): ?> 10 | 11 | 14 | 15 | date()); 17 | if ($tmpDate['year'] != $date['year']): ?> 18 |
19 |

20 | 21 |

22 |
23 | 24 | 25 | 26 | 38 | 41 | 42 | 43 | 44 | 45 | noposts()->kirbytext() ?> 46 | 47 | 48 | 49 | 50 | 51 |
52 | 53 | true, 54 | 'authors' => true, 55 | 'tags' => true, 56 | 'categories' => true)) ?> 57 | 58 | 59 | -------------------------------------------------------------------------------- /site/templates/default.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

title()->html() ?>

5 |
6 | 7 | text()->kirbytext() ?> 8 | 9 | 10 | -------------------------------------------------------------------------------- /site/templates/post.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 |
7 |

8 | 9 | title()->html() ?> 10 | 11 |

12 |
13 | 14 | $post, 15 | 'author' => true, 16 | 'avatar' => true, 17 | 'tags' => true, 18 | 'categories' => true)) ?> 19 | 20 | 21 | 22 | text()->kirbytext() ?> 23 | 24 |
25 | 26 | 27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /site/templates/posts.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
7 |
8 |

9 | 10 | title()->html() ?> 11 | 12 |

13 |
14 | 15 | $post, 16 | 'author' => true, 17 | 'tags' => true, 18 | 'category' => true)) ?> 19 | 20 | 21 | 22 | text()->kirbytext() ?> 23 | 24 |
25 | 26 | 27 | 28 | 29 |
30 | 31 | true, 32 | 'authors' => true, 33 | 'tags' => true, 34 | 'categories' => true)) ?> 35 | 36 | 37 | -------------------------------------------------------------------------------- /site/templates/search.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52 | 53 | 54 | --------------------------------------------------------------------------------