diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/comments.php | 112 | ||||
| -rw-r--r-- | includes/footer.php | 82 | ||||
| -rw-r--r-- | includes/head.php | 67 | ||||
| -rw-r--r-- | includes/header.php | 184 |
4 files changed, 0 insertions, 445 deletions
diff --git a/includes/comments.php b/includes/comments.php deleted file mode 100644 index 74cea9c..0000000 --- a/includes/comments.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php function threadedComments($comments, $options) {
- $commentClass = '';
- if ($comments->authorId) {
- if ($comments->authorId == $comments->ownerId) {
- $commentClass .= ' comment-by-author'; //如果是文章作者的评论添加 .comment-by-author 样式
- } else {
- $commentClass .= ' comment-by-user'; //如果是评论作者的添加 .comment-by-user 样式
- }
- }
- $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级
-?>
-<div role="comment" id="<?php $comments->theId(); ?>" class="comment-body<?php
-if ($comments->_levels > 0) {
- echo ' comment-child';
- $comments->levelsAlt(' comment-level-odd', ' comment-level-even');
-} else {
- echo ' comment-parent';
-}
-$comments->alt(' comment-odd', ' comment-even');
-echo $commentClass;
-?>">
- <div class="comment-body-inner">
- <div class="comment-author-avatar">
- <?php $comments->gravatar('100', ''); ?>
- </div>
- <div class="comment-main comment-author-info">
- <div class="comment-content bubble">
- <span class="comment-reply">
- <?php $comments->reply('<i class="iconfont icon-return"></i>'); ?>
- </span>
- <?php Comments::getCommentHF($comments->coid); echo Contents::parseEmo($comments->content); ?>
- </div>
- <p class="comment-meta">
- <span class="comment-author"><a href="<?php echo $comments->url; ?>" target="_blank"><?php echo $comments->author; ?></a></span>
- <span class="comment-date">
- <?php if ('waiting' == $comments->status) { ?>
- <em class="comment-waiting"><?php gtecho('commentListTexts','commentWaiting'); ?></em>
- <?php } else { ?>
- <?php $comments->date('Y-m-d H:i'); ?>
- <?php } ?>
- </span>
- </p>
- </div>
- </div>
- <?php if ($comments->children) { ?>
- <div class="comment-children">
- <?php $comments->threadedComments($options); ?>
- </div>
- <?php } ?>
-</div>
-<?php } ?>
-
- <div class="comment">
- <?php $this->comments()->to($comments); ?>
- <?php if($this->fields->commentShow == 0)://如果显示评论列表 ?>
- <?php if ($comments->have())://如果有评论 则显示 ?>
- <div class="comment-container" id="comments">
- <h3 class="comment-title" id="response"><?php $this->commentsNum(_t(gt('commentListTexts','commentNumNone')), _t(gta('commentListTexts','commentNum','1')), _t(gta('commentListTexts','commentNum','%d'))); ?></h3>
- <?php $comments->listComments(array(
- 'before' => '<div class="comment-list" role="list">',
- 'after' => '</div>',
- 'avatarSize' => 200,
- 'dateFormat' => 'Y-m-d H:i'
- )); ?>
- <div class="comment-pagenav">
- <?php $comments->pageNav('<i class="iconfont icon-chevron-left comment-pagenav-icon"></i>', '<i class="iconfont icon-chevron-right comment-pagenav-icon"></i>'); ?>
- </div>
- </div>
-
- <?php endif;//有无评论判断结束?>
- <?php else: //如果不显示评论列表 ?>
- <?php if($this->allow('comment')): ?><div class="comment-hidden"><?php gtecho('commentListTexts','commentHidden'); ?></div><?php endif; ?>
- <?php endif;//是否显示判断结束 ?>
-
- <div class="comment-form">
- <!-- 判断设置是否允许对当前文章进行评论 -->
- <?php if($this->allow('comment')): ?>
- <div id="<?php $this->respondId(); ?>" class="respond comment-box-id" data-commentUrl="<?php $this->commentUrl() ?>">
-<!-- 输入表单开始 -->
- <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
-<!-- 如果当前用户已经登录 -->
- <?php if($this->user->hasLogin()): ?>
-<!-- 显示当前登录用户的用户名以及登出连接 -->
- <p class="col-md-12 comment-logined-sign"><?php gtecho('commentListTexts','commentStatus'); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php gtecho('commentListTexts','commentLogout'); ?></a></p>
-<!-- 若当前用户未登录 -->
- <?php else: ?>
-<!-- 要求输入名字、邮箱、网址 -->
- <div class="comment-input">
- <input type="text" name="author" id="author" class="text" placeholder="<?php gtecho('commentFormTexts','nameInput'); ?>" value="<?php $this->remember('author'); ?>" required />
- <input type="email" name="mail" id="mail" class="text" placeholder="<?php gtecho('commentFormTexts','emailInput'); ?>" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
- <input type="url" name="url" id="url" class="text" placeholder="<?php gtecho('commentFormTexts','urlInput'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
- </div>
- <?php endif; ?>
-<!-- 输入要回复的内容 -->
- <p>
- <textarea rows="8" name="text" id="textarea" class="OwO-textarea comment-textarea textarea" required ><?php $this->remember('text'); ?></textarea>
- </p>
- <p class="comment-submit-box">
- <div title="OwO" class="OwO"></div>
- <div class="cancel-comment-reply"><?php $comments->cancelReply(); ?></div>
- <button type="submit" onclick="return MiraclesComment.submitComment();" class="comment-submit submit"><?php gtecho('commentFormTexts','submit'); ?></button>
- </p>
- </form>
- </div>
-<!-- 若当前文章不允许进行评论 -->
- <?php else: ?>
- <div class="comment-hidden"><?php gtecho('commentListTexts','commentClosed'); ?></div>
- <?php endif; ?>
- </div>
- </div>
- <?php //兼容 typecho 反垃圾
- if ($this->options->commentsAntiSpam) { Comments::AntiSpam($this->respondId, Typecho_Common::shuffleScriptVar($this->security->getToken(preg_replace('/\??&?_pjax=[^&]+/i','',$this->request->getRequestUrl())))); } ?>
diff --git a/includes/footer.php b/includes/footer.php deleted file mode 100644 index 197c040..0000000 --- a/includes/footer.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> - </div><!-- 结束 pjax-container --> - <!-- Footer Information --> - <footer> - <div class="footer-info footer-dark"> - <p id="custom-footer"><?php $this->options->footerEcho(); ?></p> - <p class="copyright"><span id="copyright">Powered by <a href="http://typecho.org">Typecho</a> | Theme <a href="https://github.com/BigCoke233/miracles" id="copyright-name">Miracles</a> by <a href="https://guhub.cn" id="copyright-author">Eltrac</a></span><br> - Copyright © <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a>, All rights reserved.<br> - <?php - echo $this->options->build_time; - gtecho('footerTexts','startTime'); - echo " <span id=\"build-time\"></span>"; - if($faces=$this->options->anime_face){ - $faces = explode("&&",$faces); - $faces = "<span class=\"anime-face\">".$faces[mt_rand(0,count($faces)-1)]."</span>"; - } - if($faces && $this->options->build_time) echo $faces; - ?></p> - </div> - </footer> - <!-- Raised Buttons --> - <div class="fixed-tools"> - <button class="fixed-button gotop-button hint--top" data-tooltip="<?php gtecho("otherTexts","goTop"); ?>" id="gotop"><i class="iconfont icon-chevron-up"></i></button> - </div> - <!-- JavaScript Require--> - <?php - $js_files=array("jquery","pjax.jquery","gazeimg","nprogress","OwO.min","highlight","highlight-line-number","pangu","qrcode.min","details-element-polyfill","alertify"); - if($this->options->customCDN): $custom=$this->options->customCDN; else: $custom=Helper::options()->themeUrl("","Miracles"); endif; - Utils::addRequires($js_files,"js",$this->options->CDN,$custom); - ?> - <!-- Options --><!--<nocompress>--> - <script>var navSlide = <?php if($this->options->navSlide==1):?>false<?php else:?>true<?php endif;?>; - var panguLoadAllow = <?php if($this->options->pangu==1):?>false<?php else:?>true<?php endif;?>; - var allowNavAero = <?php if($this->options->navAero==1):?>false<?php else:?>true<?php endif;?>; - var siteurl = '<?php $this->options->SiteUrl() ;?>'; - var owoJson = '<?php Utils::indexTheme('assets/OwO.json'); ?>'; - var faviconUrl = '<?php if($this->options->favicon):$this->options->favicon();else:echo Utils::indexTheme('favicon.ico');endif; ?>'; - var faviconDark = <?php $faviconDarkExist = file_exists('/faviconDark.ico'); - if($faviconDarkExist=true): echo 'true'; else: echo 'false'; endif; ?>; - var commentSubmit = '<?php gtecho('commentFormTexts','submitLoading'); ?>'; - var commentSubmitLoading = '<?php gtecho('commentFormTexts','submit'); ?>'; - var footerTimeDay = '<?php gtecho('footerTexts','startTimeDay'); ?>'; - var footerTimeHour = '<?php gtecho('footerTexts','startTimeHour'); ?>'; - var footerTimeMin = '<?php gtecho('footerTexts','startTimeMin'); ?>'; - var footerTimeSec = '<?php gtecho('footerTexts','startTimeSec'); ?>'; - var footerTimeYear = '<?php gtecho('footerTexts','startTimeYear'); ?>'; - <?php if($this->options->pjax && $this->options->pjax!=0) :?>var loadPjax = true; - beforePjax = function() {NProgress.start();}; - afterPjax = function() {owoLoad();<?php $this->options->pjax_complete(); ?>};<?php endif; ?></script><!--</nocompress>--> - <!-- Script that must be after--> - <?php - $js_files=array("miracles.min","cmt.miracles"); - if($this->options->customCDN): $custom=$this->options->customCDN; else: $custom=Helper::options()->themeUrl("","Miracles"); endif; - Utils::addRequires($js_files,"js",$this->options->CDN,$custom); - ?> - <!-- JavaScript --> - <!--<nocompress>--><script> - <?php if($this->options->build_time)echo "startTime(\"".$this->options->build_time."\");" ?> - </script><!--</nocompress>--> - <!-- Send News and Loaders --> - <script><?php if($this->is('post') || $this->is('page')): ?>owoLoad();<?php endif; ?><?php $this->options->jsEcho(); ?></script> - <!-- Others --> - <?php $this->footer(); ?> - </body> -</html> -<?php if($GLOBALS['miraclesIfCompressHTML']=='on') { - $html_source = ob_get_contents(); //获取 ob 截取内容 - ob_clean(); print Utils::compressHtml($html_source); ob_end_flush(); //完成截取、压缩 HTML -} ?> -<!-- - -Powered by Typecho, -Theme Miracles by - _____ _ _ -| ____| | |_ _ __ __ _ ___ -| _| | | __| '__/ _` |/ __| -| |___| | |_| | | (_| | (__ -|_____|_|\__|_| \__,_|\___| - -Repo: https://github.com/BigCoke233/miracles - ---> diff --git a/includes/head.php b/includes/head.php deleted file mode 100644 index 91af310..0000000 --- a/includes/head.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; -if($GLOBALS['miraclesIfCompressHTML']=='on') ob_start(); //ob 截取开始 ?> -<!DOCTYPE HTML> -<html<?php if($this->options->grayTheme && $this->options->grayTheme=1): ?> class="html-filter-gray"<?php endif; ?>> - <head> - <meta charset="<?php $this->options->charset(); ?>"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="renderer" content="webkit"> - <meta name="HandheldFriendly" content="true"> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> - <?php - $banner = ''; - $description = ''; - if($this->is('post') || $this->is('page')){ - if(isset($this->fields->excerpt)) - $description = $this->fields->excerpt; - }else{ - $description = Helper::options()->description; - }?> - <title><?php Contents::title($this); ?></title> - <meta itemprop="name" content="<?php Contents::title($this); ?>"/> - <meta itemprop="image" content="<?php Utils::indexTheme('favicon.ico'); ?>" /> - <meta name="author" content="<?php $this->author(); ?>" /> - <meta name="description" content="<?php if($description != '') echo $description; else $this->excerpt(50); ?>" /> - <meta property="og:title" content="<?php Contents::title($this); ?>" /> - <meta property="og:description" content="<?php if($description != '') echo $description; else $this->excerpt(50); ?>" /> - <meta property="og:site_name" content="<?php Helper::options()->title(); ?>" /> - <meta property="og:type" content="<?php if($this->is('post') || $this->is('page')) echo 'article'; else echo 'website'; ?>" /> - <meta property="og:url" content="<?php $this->permalink(); ?>" /> - <meta property="og:image" content="<?php echo $banner; ?>" /> - <meta property="article:published_time" content="<?php echo date('c', $this->created); ?>" /> - <meta property="article:modified_time" content="<?php echo date('c', $this->modified); ?>" /> - <meta name="twitter:title" content="<?php Contents::title($this); ?>" /> - <meta name="twitter:description" content="<?php if($description != '') echo $description; else $this->excerpt(50); ?>" /> - <meta name="twitter:card" content="summary" /> - <meta name="twitter:image" content="<?php if($this->is('post') || $this->is('page')){$this->fields->banner();} - else{ - if(empty($this->options->bannerUrl)): - echo Utils::indexTheme('favicon.ico'); - else: - $this->options->bannerUrl(); - endif;}?>" /> - <link rel="icon" id="icon" type="image/png" href="<?php if($this->options->favicon):$this->options->favicon();else:echo Utils::indexTheme('favicon.ico');endif; ?>" /> - <?php $this->header('generator=&pingback=&xmlrpc=&wlw=&commentReply=&description=&antiSpam='); ?> - <?php $this->options->headerEcho(); ?> - <!-- css --> - <?php - $css_files=array("codestyle","owo.min","nprogress","gazeimg","hint.min","main/miracles.min","alertify"); - if($this->options->customCDN): $custom=$this->options->customCDN; else: $custom=Helper::options()->themeUrl("","Miracles"); endif; - Utils::addRequires($css_files,"css",$this->options->CDN,$custom); - ?> - <!-- icon font --> - <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_1djdjjwge4m.css" /><?php - if($GLOBALS['miraclesFontCDN']['if']=='on'): - if($GLOBALS['miraclesFontCDN']['cdn']=='google_font'): - $theme_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans+SC:300|Noto+Serif+SC&display=swap"; - elseif($GLOBALS['miraclesFontCDN']['cdn']=='font_lolinet'): - $theme_font_url = "https://fonts.loli.net/css?family=Noto+Sans+SC:300|Noto+Serif+SC&display=swap"; - else: - $theme_font_url = $GLOBALS['miraclesFontCDN']['cdn']; - endif; ?> - <!-- Font CDN --> - <link href="<?php echo $theme_font_url; ?>" rel="stylesheet"> - <?php endif; ?><style>.body-dark .pio-action .pio-home{background-image: url(<?php Utils::indexTheme('images/icons/home.png'); ?>);}.body-dark .pio-action .pio-close{background-image: url(<?php Utils::indexTheme('images/icons/remove.png'); ?>);}.body-dark .pio-action .pio-skin{background-image: url(<?php Utils::indexTheme('images/icons/skin.png'); ?>);}.body-dark .pio-action .pio-info{background-image: url(<?php Utils::indexTheme('images/icons/info.png'); ?>);}.body-dark .pio-action .pio-night{background-image: url(<?php Utils::indexTheme('images/icons/night.png'); ?>);}@media (min-width:992px) {.search{background-image:url(<?php Utils::indexTheme('images/search.png'); ?>);}.login{background-image:url(<?php Utils::indexTheme('images/login.png'); ?>)}}.search {background-position: bottom right;background-repeat: no-repeat}.login {background-position: bottom left;background-repeat:no-repeat} - .comment-by-author > .comment-body-inner > .comment-main > .comment-meta > .comment-date:before {content: '<?php gtecho('commentListTexts','byAuthor'); ?>'!important}<?php $this->options->cssEcho(); ?></style> - </head> - <body class="<?php if($this->options->bodyFonts && $this->options->bodyFonts=1): ?>body-serif<?php endif; ?>">
\ No newline at end of file diff --git a/includes/header.php b/includes/header.php deleted file mode 100644 index a35fdc9..0000000 --- a/includes/header.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> - <?php if($this->options->navStyle==1): ?><div class="mask" id="full-mask"></div><?php endif; ?> - <!-- 搜索 --> - <div class="search ready"> - <button class="search-close ready" id="search-close-button"><i class="iconfont icon-x"></i></button> - <form method="post" action=""> - <div class="search-form"> - <input type="text" name="s" class="text" size="32" /> - <button type="submit" class="submit"><i class="iconfont" style="font-size:30px"></i></button> - </div> - </form> - </div> - <!-- 登录面板 --> - <div class="login ready"> - <button class="login-close ready" id="login-close"><i class="iconfont icon-x"></i></button> - <?php if($this->user->hasLogin()): ?> - <h1><?php gtecho('headerTexts','loginAlready'); ?></h1> - <p class="large-screen" style="margin-top:0"> <?php gtaecho('headerTexts','loginAlreadyInfo',$this->user->screenName); ?></p> - <p class="login-enter-admin"><a href="/admin" class="col-md-3"><?php gtecho('headerTexts','loginAdminEntrance');?></a></p> - <?php else: ?> - <form action="<?php $this->options->loginAction(); ?>" id="login-form" method="post" name="login" role="form" class="login-form"> - <h1><?php gtecho('headerTexts','loginTitle');?></h1> - <input type="text" name="name" autocomplete="username" placeholder="<?php gtecho('headerTexts','loginUsername');?>" required /> - <input type="password" name="password" autocomplete="current-password" placeholder="<?php gtecho('headerTexts','loginPassword');?>" required /> - <input type="hidden" name="referer" value="<?php - if($this->is('index')) $this->options->siteUrl(); - else $this->permalink(); - ?>"> - <button class="btn btn-normal" type="submit"><?php gtecho('headerTexts','loginSubmit');?></button> - </form> - <?php endif; ?> - </div> - - <!-- Nav Starts --> - <?php if($this->options->navStyle==0): ?> - <!-- 移动端导航面板 --> - <div class="mobile-menu ready"> - <button class="mobile-menu-close ready" id="toggle-mobile-menu-close"><i class="iconfont icon-x"></i></button> - <h2 class="mobile-menu-title"><?php gtecho('headerTexts','navTitle'); ?></h2> - <div class="mobile-menu-pagelist" role="navigation"><div class="container-fluid"><div class="row"> - <?php - if($this->options->customNav=='') { - $this->widget('Widget_Contents_Page_List') - ->parse('<div class="col-6"><a href="{permalink}">{title}</a></div>'); - } - else { - echo Contents::parseNav($this->options->customNav, "mobile"); - }?> - </div></div></div> - <div class="mobile-menu-footer"> - <p>© <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a> | Theme <a href="https://github.com/BigCoke233/miracles">Miracles</a></p> - </div> - </div> - - <!-- -小屏幕导航 --> - <nav class="small-screen nav nav-mobile nav-fixed"<?php if($this->options->navStyle==1): ?> style="display:none!important"<?php endif; ?> id="navBarMobile"> - <div class="nav-mobile-content" role="navigation"> - <a href="<?php $this->options->SiteUrl(); ?>" style="float:left"><i class="iconfont icon-xuanzhongshangcheng"></i></a> - <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> - <a id="search-open-mobile" style="float:left"><i class="iconfont icon-chaxun"></i></a> - <a id="login-open-mobile" style="float:left"><i class="iconfont icon-user"></i></a> - <a id="toggle-dark-mobile" style="float:left"><i class="iconfont icon-sun"></i></a> - <?php else://如果有自定义图标 - echo Contents::parseNavIcon($this->options->customNavIcon, "mobile"); - endif; ?> - <a id="toggle-mobile-menu-button" style="float:right">MENU <i class="iconfont icon-list"></i></a> - </div> - </nav> - <?php endif; ?> - - <!-- 导航 --> - <?php if($this->options->navStyle==0): ?> - <!-- -大屏幕导航 --> - <nav class="large-screen nav nav-fixed" id="navBar"> - <div class="container"> - <p class="nav-content" role="navigation"> - <a href="<?php $this->options->SiteUrl(); ?>" class="nav-title"><?php $this->options->title(); ?></a> - <span class="nav-content-item"> - <?php - if($this->options->customNav=='') { - $this->widget('Widget_Contents_Page_List') - ->parse('<a href="{permalink}">{title}</a>'); - } - else { - echo Contents::parseNav($this->options->customNav, "top-nav"); - }?> - </span> - </p> - <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> - <button class="nav-icon-button search-button" id="search-open-button"><i class="iconfont icon-chaxun"></i></button> - <button class="nav-icon-button login-button" id="login-open"><i class="iconfont icon-user"></i></button> - <button class="nav-icon-button setting-button" id="toggle-dark-button"><i class="iconfont icon-sun"></i></button> - <?php else://如果有自定义图标 - echo Contents::parseNavIcon($this->options->customNavIcon, "top-nav"); - endif; ?> - </div> - </nav> - <?php elseif($this->options->navStyle==1): ?> - <!-- 抽屉栏 --> - <nav class="drawer"><div class="drawer-relative"> - <div class="drawer-main"> - <button class="drawer-button" id="drawer-button"><i class="iconfont icon-list"></i></button> - <div class="drawer-header"> - <div class="drawer-avatar"> - <?php if($this->options->avatar==''): echo $this->author->gravatar(500); - else: ?><img src="<?php $this->options->avatar(); ?>"><?php endif; ?> - </div> - </div> - <div class="drawer-content"> - <a href="<?php $this->options->SiteUrl(); ?>" onclick="toggleDrawer()"><?php gtecho('headerTexts','drawerHome'); ?></a> - <?php - if($this->options->customNav=='') { - $this->widget('Widget_Contents_Page_List') - ->parse('<a href="{permalink}" onclick="toggleDrawer()">{title}</a>'); - } - else { - echo Contents::parseNav($this->options->customNav, "drawer"); - }?> - </div> - </div> - <div class="drawer-footer"> - <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> - <button class="drawer-icon" id="search-open-button"><i class="iconfont icon-chaxun"></i></button> - <button class="drawer-icon" id="login-open"><i class="iconfont icon-user"></i></button> - <button class="drawer-icon" id="toggle-dark-button"><i class="iconfont icon-sun"></i></button> - <?php else://如果有自定义图标 - echo Contents::parseNavIcon($this->options->customNavIcon, "drawer"); - endif; ?> - </div> - </div></nav> - <?php endif;?> - <!-- /Nac Ends --> - - <!-- pjax-container Starts --> - <div id="pjax-container"> - <header> - <!-- Banner --> - <?php if($this->is('post') || $this->is('page')): ?> - <div role="banner" class="index-banner" style="<?php if($this->fields->banner && $this->fields->banner=!''): ?>background:url('<?php $this->fields->banner(); ?>') no-repeat;<?php else: ?>background-color:#f1f1f1;<?php endif; ?>height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;background-position:center;"> - <?php elseif($this->is('archive')): ?> - <div role="banner" class="index-banner" style="height:<?php $this->options->bannerHeight(); ?>vh;<?php if($this->options->bannerUrl!=''): echo $this->options->bannerUrl(); endif; ?>"> - <?php else: ?> - <div role="banner" class="index-banner" style="background:url('<?php $this->options->bannerUrl(); ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;background-position:center;"> - <?php endif; ?> - <!-- 遮罩 --> - <div class="banner-mask"<?php if($this->is('post') || $this->is('page')):?><?php if($this->fields->banner==''):?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif; ?><?php if($this->is('index')):?><?php if($this->options->bannerUrl && $this->options->bannerUrl=!''): ?><?php else:?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif;?>> - <div class="main-container container"> - <div class="banner-content<?php if($this->is('index') && $this->options->bannerFont==1): ?> banner-font-black<?php endif; ?><?php if($this->is('page') || $this->is('post')): if($this->fields->banner==''): ?> banner-font-black<?php endif; endif; ?>" id="banner-content"> - <?php if($this->is('index')): ?> - <h1><?php $this->options->bannerTitle(); ?></h1> - <p><?php $this->options->bannerIntro(); ?></p> - <?php elseif($this->is('post') || $this->is('page')): ?> - <h1><?php $this->title(); ?></h1> - <div class="header-meta"> - <?php if($this->fields->meta==''): - if(!$_SESSION["isPageArchive"]){ ?> - <div class="header-meta-line-one"> - <?php if($this->is('post')): ?><span class="hint--bottom" data-tooltip="<?php gtaecho('postTexts','sort_title',$this->category) ?>"><i class="iconfont"></i> <?php $this->category(','); ?></span> <?php endif; ?> - <?php if($this->fields->commentShow=='0'):?><span class="hint--bottom" data-tooltip="<?php if($this->commentsNum=='0'): gtecho('commentListTexts', 'commentNumNone'); else:gtaecho('commentListTexts', 'commentNum', $this->commentsNum);endif; ?>"><i class="iconfont"></i> <?php $this->commentsNum('0', '1', '%d'); ?></span> <?php endif;?> - </div> - <div class="header-meta-line-two"> - <span class="hint--bottom" data-tooltip="<?php gtaecho('postTexts', 'post_time', date('Y-m-d',$this->created)); ?>"><i class="iconfont"></i> <?php $this->date(); ?></span>  - <span class="hint--bottom" data-tooltip="<?php gtaecho('postTexts', 'post_views', Contents::postViews($this)) ?>"><i class="iconfont"></i> <?php echo Contents::postViews($this) ?></span> - </div> - <?php }else{ ?> - <div class="header-meta-line-one"> - <i class="iconfont"></i> <?php gtaecho('archivePageTexts', 'archiveStart', Contents::getOldestPostDate());?>  - </div> - <div class="header-meta-line-two"> - <span class="hint--bottom" data-tooltip="<?php gtaecho('postTexts', 'post_views', Contents::postViews($this)) ?>"><i class="iconfont"></i> <?php echo Contents::postViews($this) ?></span> - </div> - <?php } - else: ?> - <?php $this->fields->meta(); ?><div style="display:none"><?php Contents::postViews($this) ?></div> - <?php endif; - $_SESSION["isPageArchive"]=false; //clear ?> - </div> - <?php elseif($this->is('archive')): ?> - <h1><?php $this->archiveTitle($GLOBALS['archivesTitles'], '', '');?></h1><?php else: endif; ?> - </div> - </div> - </div> - </div> - </header> |
