diff --git a/README.md b/README.md index 9adda90..34b7dfc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,17 @@ https://github.com/bigfa/hugo-theme-farallon ## 进度 -70% +80% + +## 功能 + +### 豆瓣观影 +配合`DoubanBoard`插件使用 +项目地址 +https://github.com/AlanDecode/Typecho-Plugin-DoubanBoard +!!记得重命名文件夹为`DoubanBoard` + +### 友情链接 +基于 `links` 插件实现 +可使用 `寒泥` 大佬制作的版本或者其他版本 -## 待实现 --[] 豆瓣观影 diff --git a/archive.php b/archive.php index 7e112a5..bf9b6b5 100644 --- a/archive.php +++ b/archive.php @@ -1,9 +1,7 @@ need('header.php'); ?> -
-
- have()): ?> -
+
+
have()): ?>

archiveTitle(array( 'category' => _t(' %s '), 'search' => _t('包含关键字 %s 的文章'), @@ -12,29 +10,27 @@ 'author' => _t('作者 %s 发布的文章') ), '', ''); ?>

categorydescription(); ?>

-
next()): ?> - -
+
+ +
-

- title() ?> - - - - +

+ title() ?>

+
+ fields->summary){echo $this->fields->summary;} else {$this->excerpt(180); } + ?> +
- - + @@ -45,26 +41,40 @@ d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"> - - commentsNum('评论', '1 评论', '%d 评论'); ?> -
-
- excerpt(180); ?> -
- - + commentsNum('评论', '1 评论', '%d 评论'); ?> +
+
+ + +
+ pagenav( + '', + '', + 1, + '...', + array( + 'wrapTag' => 'div', + 'wrapClass' => 'cat_pagination_page', + 'itemTag' => '', + 'textTag' => 'a', + 'currentClass' => 'active', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ) + ); + ?> + + +
- - +

Sorry

+

很遗憾,未找到您期待的内容

+ + +
+ - - need('footer.php'); ?> \ No newline at end of file diff --git a/comments.php b/comments.php index f867ac2..5c9f500 100644 --- a/comments.php +++ b/comments.php @@ -1,5 +1,4 @@ -
comments()->to($comments); ?> @@ -22,11 +21,48 @@ commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?> have()): ?> - - -
listComments(); ?> - + authorId) { + if ($comments->authorId == $comments->ownerId) { + $commentClass .= ' comment-by-author'; + } else { + $commentClass .= ' comment-by-user'; + } + } + + $commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent'; +?> +
  • +
    +
    + gravatar('40', ''); ?> + author(); ?> +
    +
    + date('Y-m-d H:i'); ?> + reply(); ?> +
    + content(); ?> + commentStatus(); ?> +
    +children) { ?> +
    + threadedComments($options); ?> +
    + +
  • + pageNav( @@ -74,7 +110,5 @@ -
    -
    -
    \ No newline at end of file + \ No newline at end of file diff --git a/functions.php b/functions.php index 9a887f5..4031f30 100644 --- a/functions.php +++ b/functions.php @@ -31,6 +31,7 @@ function themeConfig($form) { '0', _t('是否在文章页面显示显示作者信息'), _t('选择“是”将在文章页面包含显示作者信息。')); $form->addInput($showProfile); } + function get_post_view($archive) { $cid = $archive->cid; $db = Typecho_Db::get(); diff --git a/header.php b/header.php index d1eace2..f7a6752 100644 --- a/header.php +++ b/header.php @@ -73,7 +73,6 @@ error_reporting(E_ALL);if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> - diff --git a/page-archives.php b/page-archives.php index c1d60e6..98d324e 100644 --- a/page-archives.php +++ b/page-archives.php @@ -7,39 +7,39 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> need('header.php'); ?>
    -
    +

    title() ?>

    to($quantity); ?>

    共包含 publishedPostsNum(); ?> 篇文章

    - -
    - +
    + publishedPostsNum)->to($archives); $year = 0; $mon = 0; $i = 0; $j = 0; -$output = '
    '; - while ($archives->next()) { + $output = '
    '; + while ($archives->next()) { $year_tmp = date('Y', $archives->created); $mon_tmp = date('m', $archives->created); $y = $year; $m = $mon; if ($year > $year_tmp || $mon > $mon_tmp) { -$output .= ''; + $output .= ''; } - if ($year != $year_tmp || $mon != $mon_tmp) { + if ($year != $year_tmp || $mon != $mon_tmp) { $year = $year_tmp; $mon = $mon_tmp; -$output .= '

    ' . date('Y年', $archives->created) . '

    + $output .= '

    ' . date('Y年', $archives->created) . '

    '. date('m月', $archives->created) .'

    '; + $output .= '
    '; echo $output;?>
    diff --git a/page-categories.php b/page-categories.php index e7dc4b8..f5fb8af 100644 --- a/page-categories.php +++ b/page-categories.php @@ -11,17 +11,17 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

    title() ?>

    -widget('Widget_Metas_Category_List')->parse(' -
    - -
    - {name} - ({count}) - -
    {description}
    -
    -
    -'); ?> -
    + widget('Widget_Metas_Category_List')->parse(' +
    + +
    + {name} + ({count}) + +
    {description}
    +
    +
    + '); ?> + need('footer.php'); ?> \ No newline at end of file diff --git a/page-douban.php b/page-douban.php index adc6865..a66ebc6 100644 --- a/page-douban.php +++ b/page-douban.php @@ -11,8 +11,8 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

    title() ?>

    观影数据来源于豆瓣

    -
    +
    -
    + need('footer.php'); ?> \ No newline at end of file diff --git a/post.php b/post.php index 707c2f6..2db247a 100644 --- a/post.php +++ b/post.php @@ -2,14 +2,13 @@ need('header.php'); ?>
    - -
    - - allow('comment')): ?> - need('comments.php'); ?> - - -options->twikoo(); ?> +
    need('footer.php'); ?> diff --git a/postlist.php b/postlist.php index 749c586..b8567ff 100644 --- a/postlist.php +++ b/postlist.php @@ -1,9 +1,12 @@ next()): ?> -
    +
    -

    - title() ?>created) < 60*60*24*3): ?> +

    + + + title() ?> + created) < 60*60*24*3): ?> @@ -14,17 +17,17 @@

    -
    - - fields->summary){ +
    + + fields->summary){ echo $this->fields->summary; - } else { + } else { $this->excerpt(180); - }?> -
    -
    + }?> +
    + - -
    - +

    +