PageRenderTime 37ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/baser/plugins/blog/views/blog/default/index.php

https://github.com/hashing/basercms
PHP | 66 lines | 43 code | 5 blank | 18 comment | 3 complexity | 54185bcac3c3f793b4e5d39be0aad2e6 MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /* SVN FILE: $Id$ */
  3. /**
  4. * [PUBLISH] ブログトップ
  5. *
  6. * PHP versions 5
  7. *
  8. * baserCMS : Based Website Development Project <http://basercms.net>
  9. * Copyright 2008 - 2012, baserCMS Users Community <http://sites.google.com/site/baserusers/>
  10. *
  11. * @copyright Copyright 2008 - 2012, baserCMS Users Community
  12. * @link http://basercms.net baserCMS Project
  13. * @package baser.plugins.blog.views
  14. * @since baserCMS v 0.1.0
  15. * @version $Revision$
  16. * @modifiedby $LastChangedBy$
  17. * @lastmodified $Date$
  18. * @license http://basercms.net/license/index.html
  19. */
  20. $bcBaser->css(array('/blog/css/style','colorbox/colorbox'), array('inline' => true));
  21. $bcBaser->js('jquery.colorbox-min', false);
  22. $bcBaser->setDescription($blog->getDescription());
  23. ?>
  24. <script type="text/javascript">
  25. $(function(){
  26. if($("a[rel='colorbox']").colorbox) $("a[rel='colorbox']").colorbox({transition:"fade"});
  27. });
  28. </script>
  29. <!-- title -->
  30. <h2 class="contents-head">
  31. <?php $blog->title() ?>
  32. </h2>
  33. <!-- description -->
  34. <?php if($blog->descriptionExists()): ?>
  35. <p class="blog-description">
  36. <?php $blog->description() ?>
  37. </p>
  38. <?php endif ?>
  39. <!-- list -->
  40. <?php if(!empty($posts)): ?>
  41. <?php foreach($posts as $post): ?>
  42. <div class="post">
  43. <h4 class="contents-head">
  44. <?php $blog->postTitle($post) ?>
  45. </h4>
  46. <?php $blog->postContent($post,true,true) ?>
  47. <div class="meta"><span>
  48. <?php $blog->category($post) ?>
  49. &nbsp;
  50. <?php $blog->postDate($post) ?>
  51. &nbsp;
  52. <?php $blog->author($post) ?>
  53. </span></div>
  54. <?php $bcBaser->element('blog_tag', array('post' => $post)) ?>
  55. </div>
  56. <?php endforeach; ?>
  57. <?php else: ?>
  58. <p class="no-data">記事がありません</p>
  59. <?php endif; ?>
  60. <!-- pagination -->
  61. <?php $bcBaser->pagination('simple'); ?>