From 107e63005d013dd3caea541c921dcf8be415014e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=94=E8=90=BD?= <45323514+BigCoke233@users.noreply.github.com> Date: Sun, 24 Mar 2019 18:02:09 +0800 Subject: Add files via upload --- file.php | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ functions.php | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ index.php | 58 +++++++++++++++++++++++++++++++++++++++++++++ links.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ page.php | 52 ++++++++++++++++++++++++++++++++++++++++ post.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 378 insertions(+) create mode 100644 file.php create mode 100644 functions.php create mode 100644 index.php create mode 100644 links.php create mode 100644 page.php create mode 100644 post.php diff --git a/file.php b/file.php new file mode 100644 index 0000000..0bf18ee --- /dev/null +++ b/file.php @@ -0,0 +1,70 @@ + +need('includes/head.php'); ?> +need('includes/header.php'); ?> + +
+ + +
+ +
+ options->title(); ?> / title() ?> +
+
+ + +
+
+ fields->banner && $this->fields->banner!='') :?> +
+ +
+ +
+

title() ?>

+ + date('Y-m-d'); ?>  /   + commentsNum('%d'); ?> + +
+
+ +
+
    + widget('Widget_Contents_Post_Recent', 'pageSize='.$stat->publishedPostsNum)->to($archives); + $year=0; $mon=0; $i=0; $j=0; + 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 .= '
  • '. $year_tmp .' - '. $mon_tmp .' | '. $archives->title .'
  • '; + } + $output .= ''; + echo $output; + ?> + +
    +
    + +
    + + +
    + need('includes/sidebar.php'); ?> +
    + need('includes/toolbar.php'); ?> +
    + + +need('includes/footer.php'); ?> \ No newline at end of file diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..301b65a --- /dev/null +++ b/functions.php @@ -0,0 +1,76 @@ +addItem($banner); + + $type=new Typecho_Widget_Helper_Form_Element_Select('type',array('0'=>'一般文章','1'=>'说说'),'0','文章类型'); + $layout->addItem($type); +} + +/* +* 主题设置 +* By BigCoke +*/ +function themeConfig($form) { + + echo ""; + echo "

    Mark 2.0.0

    感谢您使用Mark主题,若有什么疑问可以查阅主题wiki,或者email我:bc@cokewithice.com
      并请您不要删除主题版权信息,谢谢配合!
    "; + + //基础设置 + $IndexName = new Typecho_Widget_Helper_Form_Element_Text('IndexName', NULL, NULL, _t('站点名称'), _t('首页名称,会在一些地方调用。')); + $form->addInput($IndexName); + + $IndexDecoration = new Typecho_Widget_Helper_Form_Element_Text('IndexDecoration', NULL, NULL, _t('站点介绍'), _t('用一句话来介绍你的网站')); + $form->addInput($IndexDecoration); + + $IndexIcon = new Typecho_Widget_Helper_Form_Element_Text('IndexIcon', NULL, NULL, _t('LOGO图标'), _t('显示在导航栏的站点名之前,参考font-awesome或者bootstrap内置图标的class')); + $form->addInput($IndexIcon); + + $news = new Typecho_Widget_Helper_Form_Element_Text('news', NULL, NULL, _t('首页公告'), _t('公告,显示在首页文章列表之前')); + $form->addInput($news); + + $avatar = new Typecho_Widget_Helper_Form_Element_Text('avatar', NULL, NULL, _t('博主头像'), _t('填入一个图片url,作为博主头像显示在侧边栏(其他地方的图片自动调用gravatar)')); + $form->addInput($avatar); + + $site_create_time = new Typecho_Widget_Helper_Form_Element_Text('site_create_time', NULL, NULL, _t('网站建立时间'), _t('格式为 2010-09-10 00:00:00 即 年-月-日 时:分:秒')); + $form->addInput($site_create_time); + + $default_banner = new Typecho_Widget_Helper_Form_Element_Text('default_banner', NULL, NULL, _t('默认头图'), _t('并非文章列表的默认缩略图,而是显示在文章内页的头图。')); + $form->addInput($default_banner); + + //侧边栏社交按钮配置 + $github = new Typecho_Widget_Helper_Form_Element_Text('github', NULL, NULL, _t('github主页地址'), _t('输入你的github主页地址,显示在侧边栏,不填写则不显示')); + $form->addInput($github); + + $QQ_num = new Typecho_Widget_Helper_Form_Element_Text('QQ_num', NULL, NULL, _t('QQ号'), _t('输入你的QQ号,在侧边栏点击后自动打开聊天窗口,不填写则不显示。')); + $form->addInput($QQ_num); + + $QQ_group = new Typecho_Widget_Helper_Form_Element_Text('QQ_group', NULL, NULL, _t('QQ群'), _t('在qq群官网,找到加群组件,将里面超链接中的url复制过来,直接打开QQ群,显示在侧边栏,不填写则不显示。')); + $form->addInput($QQ_group); + + $custom_social = new Typecho_Widget_Helper_Form_Element_Textarea('custom_social', NULL, NULL,_t('自定义社交按钮'), _t('和之前的github、qq、qq群按钮显示在一起,如有需要请根据主题wiki配置。')); + $form->addInput($custom_social); + + //个性化设置 + $bg_url = new Typecho_Widget_Helper_Form_Element_Text('bg_url', NULL, NULL, _t('背景图url'), _t('填入一个图片url作为背景图,填入背景图后自动设置透明度。')); + $form->addInput($bg_url); + + $custom_nav = new Typecho_Widget_Helper_Form_Element_Textarea('custom_nav', NULL, NULL, _t('自定义导航'), _t('用li标签结合a标签书写,若不清楚可以查看主题wiki,设置之后会直接覆盖默认的导航。')); + $form->addInput($custom_nav); + + $custom_sidebar = new Typecho_Widget_Helper_Form_Element_Textarea('custom_sidebar', NULL, NULL, _t('自定义侧边栏'), _t('显示在原有侧边栏之后,按照wiki书写。')); + $form->addInput($custom_sidebar); + + //pjax + $pjax = new Typecho_Widget_Helper_Form_Element_Select('pjax',array('0'=>'不启用','1'=>'启用'),'0','启用 PJAX (BETA)','是否启用 PJAX。如果你发现站点有点不对劲,又不知道这个选项是啥意思,请关闭此项。'); + $form->addInput($pjax); + + $pjax_reload = new Typecho_Widget_Helper_Form_Element_Textarea('pjax_reload', NULL, NULL, _t('Pjax重载函数'), _t('填入Pjax重载函数,不懂或者没有打开pjax请留空。')); + $form->addInput($pjax_reload); +} + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..5c7be02 --- /dev/null +++ b/index.php @@ -0,0 +1,58 @@ +need('includes/head.php'); +$this->need('includes/header.php'); +?> + +
    + + +
    + is('index')): ?> + +
    + options->news(); ?> +
    +
    + + + is('archive')): ?> +
    + archiveTitle(array( + 'category'=>_t('分类 %s 下的文章'), + 'search'=>_t('包含关键字 %s 的文章'), + 'tag' =>_t('标签 %s 下的文章'), + 'author'=>_t('%s 的主页') + ), '', ''); ?> + have()): ?> + +

    居然没有找到相关内容Σ(⊙▽⊙"a

    + +
    +
    + + + next()): ?> + need('includes/post-item.php'); ?> + + + +
    + + +
    + need('includes/sidebar.php'); ?> +
    + + need('includes/toolbar.php'); ?> +
    + + +need('includes/footer.php'); ?> \ No newline at end of file diff --git a/links.php b/links.php new file mode 100644 index 0000000..b0975cd --- /dev/null +++ b/links.php @@ -0,0 +1,63 @@ +need('includes/head.php'); +$this->need('includes/header.php'); ?> + +
    + +
    + +
    + options->title(); ?> / title() ?> +
    +
    + +
    +
    + fields->banner && $this->fields->banner!='') :?> +
    + +
    + +
    +

    title() ?>

    + + date('Y-m-d'); ?>  /   + commentsNum('%d'); ?> + +
    +
    + + + +
    + +
    + /s','',$this->content); + echo $content + ?> +
    +
    + + need('includes/comments.php'); ?> +
    + + +
    + need('includes/sidebar.php'); ?> +
    + + need('includes/toolbar.php'); ?> +
    + +need('includes/footer.php'); ?> \ No newline at end of file diff --git a/page.php b/page.php new file mode 100644 index 0000000..3dcd3a9 --- /dev/null +++ b/page.php @@ -0,0 +1,52 @@ +need('includes/head.php'); ?> +need('includes/header.php'); ?> + +
    + + +
    + +
    + options->title(); ?> / title() ?> +
    +
    + + +
    +
    + fields->banner && $this->fields->banner!='') :?> +
    + +
    + +
    +

    title() ?>

    + + date('Y-m-d'); ?>  /   + commentsNum('%d'); ?> + +
    +
    + +
    + /s','',$this->content); + echo $content + ?> +
    + +
    + + need('includes/comments.php'); ?> +
    +
    + + +
    + need('includes/sidebar.php'); ?> +
    + need('includes/toolbar.php'); ?> +
    + + +need('includes/footer.php'); ?> \ No newline at end of file diff --git a/post.php b/post.php new file mode 100644 index 0000000..af88a3d --- /dev/null +++ b/post.php @@ -0,0 +1,59 @@ +need('includes/head.php'); ?> +need('includes/header.php'); ?> + +
    + + +
    + +
    + options->title(); ?> / category('', true, '无分类'); ?> / title() ?> +
    +
    + + +
    +
    + fields->banner && $this->fields->banner!='') :?> +
    + +
    + +
    +

    title() ?>

    + + date('Y-m-d'); ?>  /   + category(',', true, '木有分类'); ?>  /   + commentsNum('%d'); ?> + +
    +
    + +
    + /s','',$this->content); + echo $content + ?> +
    + + +
    + + need('includes/comments.php'); ?> +
    +
    + + +
    + need('includes/sidebar.php'); ?> +
    + need('includes/toolbar.php'); ?> +
    + + +need('includes/footer.php'); ?> \ No newline at end of file -- cgit v1.2.3