diff --git a/404.php b/404.php new file mode 100644 index 0000000..cede367 --- /dev/null +++ b/404.php @@ -0,0 +1,26 @@ + +need('header.php'); ?> +
+
+
404
+
+ +
+
+
+need('footer.php'); ?> diff --git a/README.md b/README.md new file mode 100644 index 0000000..ea6b979 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## 说明 + +从hexo的Chic移植而来 \ No newline at end of file diff --git a/archive.php b/archive.php new file mode 100644 index 0000000..22e97bf --- /dev/null +++ b/archive.php @@ -0,0 +1,41 @@ + +need('part/head.php'); ?> +
+need('part/header.php'); ?> +
+

archiveTitle(array( + 'category' => _t(' %s '), + 'search' => _t('包含关键字 %s 的文章'), + 'date' => _t('在 %s 发布的文章'), + 'tag' => _t('标签 %s 下的文章'), + 'author' => _t('作者 %s 发布的文章') + ), '', ''); ?> -

+next()): + $currentYear = date('Y', $this->created); + if ($previousYear !== $currentYear): + if ($previousYear !== null): ?> +
+ +

+
+ + + + + +
+ + +
+need('part/paginator.php'); ?> + +need('part/footer.php'); ?> \ No newline at end of file diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..22fbfa5 --- /dev/null +++ b/comments.php @@ -0,0 +1,487 @@ + + +
+ comments()->to($comments); ?> + allow('comment')): ?> + is('attachment')) : ?> + + +

+ commentsNum(_t('0'), _t('1'), _t('%d')); ?> +

+
    + have()): ?> + listComments(); ?> + pageNav( + '', + '', + 1, + '...', + array( + 'wrapTag' => 'div', + 'wrapClass' => 'pagination_page', + 'itemTag' => '', + 'textTag' => 'a', + 'currentClass' => 'active', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ) + ); + ?> + + +

    + + +
    + +
    + user->hasLogin()): ?> +

    + + user->screenName(); ?>. + »

    + + +

    + +

    +

    + options->commentsRequireMail): ?> required /> +

    +

    + options->commentsRequireURL): ?> required /> +

    + +

    + +

    + +

    + +

    +
    +
    + + + + + options->twikoo(); ?> +
    +authorId) { + if ($comments->authorId == $comments->ownerId) { + $commentClass .= ' comment-by-author'; + } else { + $commentClass .= ' comment-by-user'; + } + } + $depth = $comments->levels + 1; + ?> +
  1. +
    +
    +
    + url): ?> + gravatar('40', ''); ?> + + gravatar('40', ''); ?> + + +
    +
    +
    author; ?> +
    date('Y-m-d H:i'); ?>
    + + reply(''); ?> + +
    +
    +
    +
    + content(); ?> +
    +
    + children) { ?> +
      + threadedComments($options); ?> +
    + +
  2. + +
      + comments()->to($comments); ?> + next()): ?> + +
    diff --git a/dist/css/style.css b/dist/css/style.css new file mode 100644 index 0000000..5f4b515 --- /dev/null +++ b/dist/css/style.css @@ -0,0 +1,1160 @@ +/* normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ +html { + line-height: 1.15 /* 1 */; + -webkit-text-size-adjust: 100% /* 2 */; + } + body { + margin: 0; + } + h1 { + font-size: 2em; + margin: 0.67em 0; + } + hr { + box-sizing: content-box /* 1 */; + height: 0 /* 1 */; + overflow: visible /* 2 */; + } + pre { + font-family: monospace, monospace /* 1 */; + font-size: 1em /* 2 */; + } + a { + background-color: transparent; + } + abbr[title] { + border-bottom: none /* 1 */; + text-decoration: underline /* 2 */; + text-decoration: underline dotted /* 2 */; + } + b, + strong { + font-weight: bolder; + } + code, + kbd, + samp { + font-family: monospace, monospace /* 1 */; + font-size: 1em /* 2 */; + } + small { + font-size: 80%; + } + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + img { + border-style: none; + } + button, + input, + optgroup, + select, + textarea { + font-family: inherit /* 1 */; + font-size: 100% /* 1 */; + line-height: 1.15 /* 1 */; + margin: 0 /* 2 */; + } + button, + input { + overflow: visible; + } + button, + select { + text-transform: none; + } + button, + [type="button"], + [type="reset"], + [type="submit"] { + -webkit-appearance: button; + } + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + button:-moz-focusring, + [type="button"]-moz-focusring, + [type="reset"]-moz-focusring, + [type="submit"]-moz-focusring { + outline: 1px dotted ButtonText; + } + fieldset { + padding: 0.35em 0.75em 0.625em; + } + legend { + box-sizing: border-box /* 1 */; + color: inherit /* 2 */; + display: table /* 1 */; + max-width: 100% /* 1 */; + padding: 0 /* 3 */; + white-space: normal /* 1 */; + } + progress { + vertical-align: baseline; + } + textarea { + overflow: auto; + } + [type="checkbox"], + [type="radio"] { + box-sizing: border-box /* 1 */; + padding: 0 /* 2 */; + } + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + height: auto; + } + [type="search"] { + -webkit-appearance: textfield /* 1 */; + outline-offset: -2px /* 2 */; + } + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-file-upload-button { + -webkit-appearance: button /* 1 */; + font: inherit /* 2 */; + } + details { + display: block; + } + summary { + display: list-item; + } + template { + display: none; + } + [hidden] { + display: none; + } + html::-webkit-scrollbar { + width: 8px; + height: 8px; + } + html::-webkit-scrollbar-thumb { + height: 40px; + background-color: #eee; + border-radius: 16px; + } + html::-webkit-scrollbar-thumb:hover { + background-color: #ddd; + } + body { + font-size: 11pt; + font-weight: normal; + line-height: 2em; + overflow: overlay; + background-color: #fff; + color: #161209; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + body:before { + content: ""; + background-repeat: no-repeat; + background-position: center; + opacity: 0.05; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + } + body.dark-theme { + background-color: #292a2d; + color: #a9a9b3; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + a { + color: #161209; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + cursor: pointer; + } + a:hover { + color: #2d96bd; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + .dark-theme a { + color: #a9a9b3; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + .dark-theme a:hover { + color: #fff; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + .wrapper { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; + } + .navbar { + height: 4rem; + line-height: 4rem; + width: 100%; + } + .navbar .container { + width: auto; + max-width: 1200px; + text-align: center; + padding-left: 1em; + padding-right: 1em; + margin: 0 auto; + display: flex; + justify-content: space-between; + } + .main { + flex-grow: 1; + flex-shrink: 0; + flex-basis: auto; + display: flex; + flex-direction: column; + } + .main .container { + padding-left: 1em; + padding-right: 1em; + height: 100%; + display: flex; + flex-direction: column; + flex: 1; + } + .footer { + height: 4rem; + width: 100%; + text-align: center; + line-height: 4rem; + } + /*input css begin*/ + *{ + -webkit-tap-highlight-color: rgba(0,0,0,0); + } + input[type="checkbox"]:checked + label:after{ + transition: all 0.3s ease-in; + } + input[type="checkbox"]:not(:checked) + label:after { + transition: all 0.3s ease-out; + } + input[type="checkbox"]:checked + label, + input[type="checkbox"]:not(:checked) + label{ + transition: all 0.3s ease-in-out; + } + input[type="checkbox"]:checked + label:before,input[type="checkbox"]:checked + label i:before,input[type="checkbox"]:not(:checked) + label i:before, + input[type="checkbox"]:checked + label i:after,input[type="checkbox"]:not(:checked) + label i:after,input[type="checkbox"]:not(:checked) + label:before{ + transition: all 0.3s ease-in-out; + } + input[type="radio"]:checked + label:after, + input[type="radio"]:not(:checked) + label:after { + transition: all 0.3s ease-in-out; + } + .switch_default[type="checkbox"]{ + display: none; + } + .switch_default + label{ + background-color: #e6e6e6; + border-radius:7px; + cursor: pointer; + display: inline-block; + height: 14px; + position: relative; + box-shadow: 0.2px 0.2px 1px 0.5px rgb(180,180,180); + width: 30px; + } + .switch_default + label:after{ + background-color: #fff; + border-radius: 50%; + content: ""; + height: 12px; + left: 1px; + position: absolute; + top: .5px; + width: 12px; + box-shadow: 0.2px 0.2px 1px 0.5px rgb(180,180,180); + } + .switch_default:checked + label{ + background-color: #1ABC9C; + box-shadow:none; + } + .switch_default:checked + label:after{ + left: 17px; + } + .header-logo a { + padding: 0; + } + .navbar .menu a { + padding: 0 8px; + } + .navbar .menu .active { + font-weight: 900; + color: #161209; + } + .dark-theme .navbar .menu .active { + color: #fff; + } + .navbar-header a:hover, + .navbar .menu a:hover { + background-color: transparent; + } + header label { + margin-left: 15px; + position: relative; + -webkit-transform: translateY(0.1em) translateX(0.5em); + } + .copyright { + font-size: 14px; + } + .pagination { + display: flex; + flex-direction: row; + justify-content: center; + list-style: none; + white-space: nowrap; + width: 100%; + padding-top: 2em; + } + .pagination a, + .pagination span { + -webkit-font-smoothing: antialiased; + font-size: 12px; + color: #bfbfbf; + letter-spacing: 0.1em; + font-weight: 700; + padding: 5px 5px; + text-decoration: none; + transition: 0.3s; + } + .pagination .page-number { + padding-bottom: 3px; + margin: 0 20px; + box-sizing: border-box; + position: relative; + display: inline; + } + .pagination .page-number.disabled { + display: none; + } + .pagination .page-number:hover a { + color: #000; + } + .dark-theme .pagination .page-number:hover a { + color: #fff; + } + .pagination .page-number:before, + .pagination .page-number:after { + position: absolute; + content: ""; + width: 0; + height: 1px; + background: #000; + transition: 0.3s; + bottom: 0px; + } + .dark-theme .pagination .page-number:before, + .dark-theme .pagination .page-number:after { + background: #fff; + } + .pagination .page-number:before .current, + .pagination .page-number:after .current { + width: 100%; + } + .pagination .page-number:before { + left: 50%; + } + .pagination .page-number:after { + right: 50%; + } + .pagination .page-number:hover:before, + .pagination .page-number:hover:after { + width: 50%; + } + .pagination .page-number.current { + color: #000; + } + .dark-theme .pagination .page-number.current { + color: #fff; + } + .pagination .page-number.current:before, + .pagination .page-number.current:after { + width: 60%; + } + .profile-container { + justify-content: center; + align-items: center; + } + .intro { + text-align: center; + } + .intro .avatar { + padding: 10px; + } + .intro .avatar img { + width: 128px; + height: auto; + display: inline-block; + -webkit-border-radius: 100%; + border-radius: 100%; + -webkit-box-shadow: 0 0 0 0.3618em rgba(0,0,0,0.05); + box-shadow: 0 0 0 0.3618em rgba(0,0,0,0.05); + margin: 0 auto; + -webkit-transition: all ease 0.4s; + -moz-transition: all ease 0.4s; + -o-transition: all ease 0.4s; + transition: all ease 0.4s; + cursor: pointer; + } + .intro .avatar img:hover { + position: relative; + -webkit-transform: translateY(-0.75em); + -moz-transform: translateY(-0.75em); + -ms-transform: translateY(-0.75em); + -o-transform: translateY(-0.75em); + transform: translateY(-0.75em); + cursor: pointer; + } + .nickname { + font-size: 2em; + font-weight: normal; + } + .links a { + padding: 0 5px; + } + .links a:hover { + background-color: transparent; + } + .links .iconfont { + font-size: 2em; + } + .post-wrap { + position: relative; + width: 100%; + max-width: 780px; + margin: 0 auto; + padding-top: 2rem; + } + .post-wrap .archive-item { + margin-left: 2rem; + } + .archive-item-link { + display: inline-block; + text-decoration: none; + overflow: hidden; + white-space: nowrap; + } + .archive-item-link:hover { + color: #2d96bd; + background-color: transparent; + } + .dark-theme .archive-item-link { + color: #a9a9b3; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + .dark-theme .archive-item-link:hover { + color: #fff; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; + } + .archive-item-date { + float: right; + text-align: right; + color: #a9a9b3; + } + .dark-theme .archive-item-date { + color: #87878d; + } + .post-wrap .categories-card { + margin: 0 auto; + margin-top: 1em; + display: flex; + align-items: center; + justify-content: space-between; + flex-direction: row; + flex-wrap: wrap; + padding: 0 2.5em; + line-height: 1.6em; + } + .post-wrap .categories-card .card-item { + font-size: 14px; + text-align: left; + width: 45%; + display: flex; + align-items: flex-start; + margin-top: 2em; + min-height: 16em; + padding: 0 2%; + position: relative; + } + .post-wrap .categories-card .card-item .categories { + overflow: hidden; + } + .tag-cloud-tags { + margin: 10px 0; + padding-top: 2em; + } + .tag-cloud-tags a { + display: inline-block; + position: relative; + margin: 5px 10px; + word-wrap: break-word; + transition-duration: 0.3s; + transition-property: transform; + transition-timing-function: ease-out; + } + .tag-cloud-tags a:active, + .tag-cloud-tags a:focus, + .tag-cloud-tags a:hover { + color: #2d96bd; + transform: scale(1.1); + } + .dark-theme .tag-cloud-tags a:active, + .dark-theme .tag-cloud-tags a:focus, + .dark-theme .tag-cloud-tags a:hover { + color: #fff; + } + .tag-cloud-tags a small { + margin: 0 0.3em; + color: #a9a9b3; + } + .dark-theme .tag-cloud-tags a small { + color: #fff; + } + .page { + padding-top: 0; + } + .page .post-content { + margin: 0; + padding-top: 0; + } + .post-wrap p { + font-size: 1em; + margin: 1em 0 1em 0; + } + .post-wrap .post-header h1 { + margin: 0 !important; + } + .post-wrap .post-title { + font-size: 2em; + line-height: 1.5em; + } + .post-wrap .post-meta { + color: rgba(85,85,85,0.529) !important; + } + .dark-theme .post-wrap .post-meta { + color: #87878d !important; + } + .post-wrap .post-meta a { + color: #2d96bd; + } + .dark-theme .post-wrap .post-meta a { + color: #eee; + } + .post-wrap .post-meta a:hover { + color: #ef3982; + } + .dark-theme .post-wrap .post-meta a:hover { + color: #fff; + } + .post-content { + padding-top: 2rem; + text-align: justify; + } + .post-content h2, + .post-content h3, + .post-content h4, + .post-content h5, + .post-content h6 { + padding-top: 0.8em; + padding-bottom: 0.3em; + } + .post-content h1::before { + content: "#"; + margin-right: 5px; + color: #2d96bd; + } + .dark-theme .post-content h1::before { + color: #eee; + } + .post-content h2::before { + content: "#"; + margin-right: 5px; + color: #2d96bd; + } + .dark-theme .post-content h2::before { + color: #eee; + } + .post-content h3::before { + content: "|"; + margin-right: 5px; + color: #2d96bd; + } + .dark-theme .post-content h3::before { + color: #eee; + } + .post-content h4::before { + content: "*"; + margin-right: 5px; + color: #2d96bd; + } + .dark-theme .post-content h4::before { + color: #eee; + } + .post-content a { + color: #2d96bd; + } + .dark-theme .post-content a { + color: #eee; + } + .post-content a:hover { + color: #ef3982; + } + .dark-theme .post-content a:hover:hover { + color: #fff; + text-decoration: underline; + } + .post-content code, + .post-content pre { + padding: 7px; + font-size: 13px; + font-family: Consolas, Monaco, Menlo, Consolas, monospace; + } + .post-content code { + padding: 3px 5px; + border-radius: 4px; + } + .post-content figure.highlight { + margin: 1em 0; + overflow-x: auto; + position: relative; + } + .post-content figure.highlight::-webkit-scrollbar { + width: 6px; + height: 6px; + } + .post-content figure.highlight::-webkit-scrollbar-thumb { + width: 6px; + background-color: #eee; + border-radius: 2px; + } + .post-content figure.highlight table { + position: relative; + } + .post-content figure.highlight table, + .post-content figure.highlight tr, + .post-content figure.highlight td { + margin: 0; + padding: 0; + border: 0; + width: 100%; + border-collapse: collapse; + } + .post-content figure.highlight .code pre { + margin: 0 10px; + } + .post-content figure.highlight .gutter { + width: 10px; + color: #d0d0d0; + } + .post-content figure.highlight .gutter pre { + margin: 0; + } + .post-content ul { + padding-left: 2em; + } + .post-content table { + max-width: 100%; + margin: 10px 0; + border-spacing: 0; + } + .post-content table thead { + background: #bce1ef; + } + .dark-theme .post-content table thead { + background: #626262; + } + .post-content table th, + .post-content table td { + padding: 5px 15px; + border: 0.5px solid #e8e8e8; + } + .post-content .image-caption:not(:empty) { + min-width: 20%; + max-width: 80%; + display: inline-block; + padding: 10px; + margin: 0 auto; + border-bottom: 1px solid #d9d9d9; + font-size: 14px; + color: #969696; + line-height: 1.7; + } + .post-content img { + display: block; + max-width: 100%; + height: auto; + margin: 0 auto; + overflow: hidden; + } + .post-content img[data-action="zoom"] { + cursor: zoom-in; + } + .post-content .image-box .image-box-title { + text-align: center; + font-size: 0.7em; + margin-top: 0.5em; + margin-bottom: 1em; + color: #a9a9b3; + } + .dark-theme .post-content .image-box .image-box-title { + color: #87878d; + } + .post-content blockquote { + font-size: 1rem; + display: block; + margin: 1em 0; + padding: 1em 1.2em 1em 1.2em; + position: relative; + color: rgba(52,73,94,0.8); + background-color: #e9f5fa; + border-left: 2px solid #2d96bd; + } + .post-content blockquote p { + margin: 0; + } + .post-content blockquote footer strong { + margin-right: 0.5em; + } + .dark-theme .post-content blockquote { + color: #a9a9b3; + background-color: #3e3e3e; + border-left: 2px solid #dcdcdc; + } + .post-content blockquote.pullquote { + background-color: transparent; + max-width: 45%; + border: 0; + } + .post-content blockquote.pullquote.left { + float: left; + text-align: left; + } + .post-content blockquote.pullquote.right { + float: right; + text-align: right; + } + .post-copyright { + margin-top: 5rem; + border-top: 1px solid #e8e8e8; + border-bottom: 1px solid #e8e8e8; + } + .post-copyright a { + color: #2d96bd; + } + .dark-theme .post-copyright a { + color: #eee; + } + .post-copyright a:hover { + color: #ef3982; + } + .dark-theme .post-copyright a:hover { + color: #fff; + } + .post-copyright .copyright-item { + margin: 5px 0; + } + .post-copyright .lincese { + font-weight: bold; + } + .dark-theme .post-copyright { + border-top: 1px solid #909196; + border-bottom: 1px solid #909196; + } + .post-content code, + .post-content pre { + line-height: 1.7em; + padding: 7px; + font-size: 13px; + font-family: Consolas, Monaco, Menlo, Consolas, monospace; + } + .post-content code { + line-height: 1.7em; + padding: 3px 5px; + border-radius: 4px; + color: #c7254e; + background: #f8f5ec; + } + .dark-theme .post-content code { + color: #fffe28; + background: #787575; + } + .post-content h1 code, + .post-content h2 code, + .post-content h3 code, + .post-content h4 code, + .post-content h5 code { + font-size: inherit; + } + .post-content figure.highlight { + margin: 1em 0; + overflow-x: auto; + position: relative; + } + .post-content figure.highlight::-webkit-scrollbar { + width: 6px; + height: 6px; + } + .post-content figure.highlight::-webkit-scrollbar-thumb { + width: 6px; + background-color: #eee; + border-radius: 2px; + } + .post-content figure.highlight figcaption { + padding: 0 0.5em; + text-align: right; + font-size: 13px; + } + .post-content figure.highlight figcaption span { + margin: 0 0.5em; + } + .post-content figure.highlight table { + position: relative; + } + .post-content figure.highlight table, + .post-content figure.highlight tr, + .post-content figure.highlight td { + margin: 0; + padding: 0; + border: 0; + width: 100%; + border-collapse: collapse; + } + .post-content figure.highlight .code pre { + margin: 0 10px; + } + .post-content figure.highlight .gutter { + width: 10px; + color: #d0d0d0; + } + .post-content figure.highlight .gutter pre { + margin: 0; + } + .post-tags { + padding: 1rem 0 1rem; + display: flex; + justify-content: space-between; + } + .post-nav:before, + .post-nav:after { + content: " "; + display: table; + } + .post-nav a.prev, + .post-nav a.next { + font-weight: 600; + font-size: 16px; + transition-property: transform; + transition-timing-function: ease-out; + transition-duration: 0.3s; + } + .post-nav a.prev { + float: left; + } + .post-nav a.prev::before { + content: "<"; + margin-right: 0.5em; + } + .post-nav a.prev:hover { + transform: translateX(-4px); + } + .post-nav a.next { + float: right; + } + .post-nav a.next::after { + content: ">"; + margin-left: 0.5em; + } + .post-nav a.next:hover { + transform: translateX(4px); + } + .post-nav a.prev::before, + .post-nav a.next::after { + font-weight: bold; + } + .tag:not(:last-child) a::after { + content: " / "; + } + .post-toc { + position: fixed; + top: 95px; + right: 2em; + width: 15rem; + font-size: 0.75rem; + } + .post-toc .tocbot-list { + max-height: 450px; + max-width: 250px; + overflow: auto; + position: relative; + padding-right: 0.875rem; + } + .post-toc .tocbot-list::-webkit-scrollbar { + width: 6px; + height: 6px; + } + .post-toc .tocbot-list::-webkit-scrollbar-thumb { + width: 6px; + background-color: #eee; + border-radius: 2px; + } + .post-toc .tocbot-list ul { + list-style: none; + position: inherit; + overflow: hidden; + } + .post-toc .tocbot-list ul li { + margin-left: 0.25rem; + } + .post-toc .toc-link::before { + background-color: #fff; + } + .post-toc .is-active-link::before { + background-color: #2d96bd; + } + .post-toc .tocbot-list-menu { + margin: 1rem 0.75rem; + font-size: 0.75rem; + } + .post-toc .tocbot-list-menu a { + display: block; + margin: 0.375rem 0; + color: #999; + cursor: pointer; + } + .post-toc .tocbot-list-menu a:hover { + color: #808080; + } + .toc{overflow-y:auto}.toc>.toc-list{overflow:hidden;position:relative}.toc>.toc-list li{list-style:none}.toc-list{margin:0;padding-left:10px}a.toc-link{color:currentColor;height:100%}.is-collapsible{max-height:1000px;overflow:hidden;transition:all 300ms ease-in-out}.is-collapsed{max-height:0}.is-position-fixed{position:fixed !important;top:0}.is-active-link{font-weight:700}.toc-link::before{background-color:#EEE;content:' ';display:inline-block;height:inherit;left:0;margin-top:-1px;position:absolute;width:2px}.is-active-link::before{background-color:#54BC4B} + + @media screen and (max-width: 479px) { + .main { + padding-top: 40pt; + } + .navbar { + display: none; + } + .navbar-mobile { + display: block !important; + position: fixed; + width: 100%; + z-index: 100; + transition: all 0.6s ease 0s; + } + .navbar-mobile .container { + padding: 0; + margin: 0; + line-height: 5.5em; + background: #fff; + } + .navbar-mobile .container .navbar-header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding-right: 1em; + padding-left: 1em; + box-sizing: border-box; + position: relative; + } + .navbar-mobile .container .navbar-header .menu-toggle { + cursor: pointer; + line-height: 5.5em; + padding: auto 2em; + } + .navbar-mobile .container .navbar-header .menu-toggle span { + display: block; + background: #000; + width: 36px; + height: 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-transition: 0.25s margin 0.25s, 0.25s transform; + -moz-transition: 0.25s margin 0.25s, 0.25s transform; + transition: 0.25s margin 0.25s, 0.25s transform; + } + .dark-theme .navbar-mobile .container .navbar-header .menu-toggle span { + background: #a9a9b3; + } + .navbar-mobile .container .navbar-header .menu-toggle span:nth-child(1) { + margin-bottom: 8px; + } + .navbar-mobile .container .navbar-header .menu-toggle span:nth-child(3) { + margin-top: 8px; + } + .navbar-mobile .container .navbar-header .menu-toggle.active span { + -webkit-transition: 0.25s margin, 0.25s transform 0.25s; + -moz-transition: 0.25s margin, 0.25s transform 0.25s; + transition: 0.25s margin, 0.25s transform 0.25s; + } + .navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(1) { + -moz-transform: rotate(45deg) translate(4px, 6px); + -ms-transform: rotate(45deg) translate(4px, 6px); + -webkit-transform: rotate(45deg) translate(4px, 6px); + transform: rotate(45deg) translate(4px, 6px); + } + .navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(2) { + opacity: 0; + } + .navbar-mobile .container .navbar-header .menu-toggle.active span:nth-child(3) { + -moz-transform: rotate(-45deg) translate(8px, -10px); + -ms-transform: rotate(-45deg) translate(8px, -10px); + -webkit-transform: rotate(-45deg) translate(8px, -10px); + transform: rotate(-45deg) translate(8px, -10px); + } + .navbar-mobile .container .menu { + text-align: center; + background: #fff; + border-top: 1px solid #000; + padding-top: 1em; + padding-bottom: 1em; + display: none; + box-shadow: 0px 2px 4px rgba(0,0,0,0.1), 0px 4px 8px rgba(0,0,0,0.1); + } + .navbar-mobile .container .menu a { + display: inline-block; + margin: 0 1em; + line-height: 2.5em; + } + .navbar-mobile .container .menu.active { + display: block; + white-space: nowrap; + box-sizing: border-box; + overflow-x: auto; + } + .dark-theme .navbar-mobile .container .menu { + background: #292a2d; + border-top: 2px solid #87878d; + } + .dark-theme .navbar-mobile .container { + background: #292a2d !important; + } + .archive { + width: 90%; + } + .archive .archive-item .archive-item-date { + display: none; + } + #dynamic-to-top { + display: none !important; + } + .footer { + height: 3rem; + width: 100%; + text-align: center; + line-height: 1.5rem; + padding-top: 2em; + } + .post-warp { + padding-top: 6em; + } + .post-warp .archive-item-date { + display: none; + } + .categories .categories-card .card-item { + width: 100%; + display: flex; + min-height: 0; + } + .categories .categories-card .card-item .categories { + overflow: hidden; + } + } + @media screen and (max-width: 1023px) { + .navbar-mobile { + display: none; + } + } + @media screen and (min-width: 1024px) { + .navbar-mobile { + display: none; + } + } + @media screen and (max-width: 1279px) { + .post-toc { + display: none; + } + } + .highlight { + background: #272822; + color: #ddd; + } + .highlight .code .tag, + .highlight .code .keyword, + .highlight .code .selector-tag, + .highlight .code .literal, + .highlight .code .strong, + .highlight .code .name { + color: #f92672; + } + .highlight .code .code { + color: #66d9ef; + } + .highlight .code .class .title { + color: #fff; + } + .highlight .code .attribute, + .highlight .code .symbol, + .highlight .code .regexp, + .highlight .code .link { + color: #bf79db; + } + .highlight .code .string, + .highlight .code .bullet, + .highlight .code .subst, + .highlight .code .title, + .highlight .code .section, + .highlight .code .emphasis, + .highlight .code .type, + .highlight .code .built_in, + .highlight .code .builtin-name, + .highlight .code .selector-attr, + .highlight .code .selector-pseudo, + .highlight .code .addition, + .highlight .code .variable, + .highlight .code .template-tag, + .highlight .code .template-variable { + color: #a6e22e; + } + .highlight .code .comment, + .highlight .code .quote, + .highlight .code .deletion, + .highlight .code .meta { + color: #75715e; + } + .highlight .code .keyword, + .highlight .code .selector-tag, + .highlight .code .literal, + .highlight .code .doctag, + .highlight .code .title, + .highlight .code .section, + .highlight .code .type, + .highlight .code .selector-id { + font-weight: bold; + } \ No newline at end of file diff --git a/dist/js/script.js b/dist/js/script.js new file mode 100644 index 0000000..e746cea --- /dev/null +++ b/dist/js/script.js @@ -0,0 +1,87 @@ +// declaraction of document.ready() function. +(function () { + var ie = !!(window.attachEvent && !window.opera); + var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525); + var fn = []; + var run = function () { + for (var i = 0; i < fn.length; i++) fn[i](); + }; + var d = document; + d.ready = function (f) { + if (!ie && !wk && d.addEventListener) + return d.addEventListener('DOMContentLoaded', f, false); + if (fn.push(f) > 1) return; + if (ie) + (function () { + try { + d.documentElement.doScroll('left'); + run(); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); + else if (wk) + var t = setInterval(function () { + if (/^(loaded|complete)$/.test(d.readyState)) + clearInterval(t), run(); + }, 0); + }; +})(); + + +document.ready( + // toggleTheme function. + // this script shouldn't be changed. + () => { + var _Blog = window._Blog || {}; + const currentTheme = window.localStorage && window.localStorage.getItem('theme'); + const isDark = currentTheme === 'dark'; + const pagebody = document.getElementsByTagName('body')[0] + if (isDark) { + document.getElementById("switch_default").checked = true; + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Dark" + } else { + document.getElementById("switch_default").checked = false; + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Light" + } + _Blog.toggleTheme = function () { + if (isDark) { + pagebody.classList.add('dark-theme'); + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Dark" + } else { + pagebody.classList.remove('dark-theme'); + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Light" + } + document.getElementsByClassName('toggleBtn')[0].addEventListener('click', () => { + if (pagebody.classList.contains('dark-theme')) { + pagebody.classList.remove('dark-theme'); + } else { + pagebody.classList.add('dark-theme'); + } + window.localStorage && + window.localStorage.setItem('theme', document.body.classList.contains('dark-theme') ? 'dark' : 'light',) + }) + // moblie + document.getElementById('mobile-toggle-theme').addEventListener('click', () => { + if (pagebody.classList.contains('dark-theme')) { + pagebody.classList.remove('dark-theme'); + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Light" + + } else { + pagebody.classList.add('dark-theme'); + // mobile + document.getElementById("mobile-toggle-theme").innerText = "· Dark" + } + window.localStorage && + window.localStorage.setItem('theme', document.body.classList.contains('dark-theme') ? 'dark' : 'light',) + }) + }; + _Blog.toggleTheme(); + // ready function. + } +); diff --git a/dist/js/tocbot.min.js b/dist/js/tocbot.min.js new file mode 100644 index 0000000..e9bc290 --- /dev/null +++ b/dist/js/tocbot.min.js @@ -0,0 +1 @@ +!function(e){function t(o){if(n[o])return n[o].exports;var l=n[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){(function(o){var l,r,i;!function(n,o){r=[],l=o(n),void 0!==(i="function"==typeof l?l.apply(t,r):l)&&(e.exports=i)}(void 0!==o?o:this.window||this.global,function(e){"use strict";function t(){for(var e={},t=0;te.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=p+e.positionFixedClass):n.className=n.className.split(p+e.positionFixedClass).join("")}function i(t){var n=0;return t!=document.querySelector(e.contentSelector&&null!=t)&&(n=t.offsetTop,e.hasInnerContainers&&(n+=i(t.offsetParent))),n}function s(t){if(e.scrollContainer&&document.querySelector(e.scrollContainer))var n=document.querySelector(e.scrollContainer).scrollTop;else var n=document.documentElement.scrollTop||m.scrollTop;e.positionFixedSelector&&r();var o,l=t;if(h&&null!==document.querySelector(e.tocSelector)&&l.length>0){f.call(l,function(t,r){if(i(t)>n+e.headingsOffset+10){return o=l[0===r?r:r-1],!0}if(r===l.length-1)return o=l[l.length-1],!0});var s=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass);d.call(s,function(t){t.className=t.className.split(p+e.activeLinkClass).join("")});var a=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass);d.call(a,function(t){t.className=t.className.split(p+e.activeListItemClass).join("")});var u=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+o.nodeName+'[href="#'+o.id+'"]');-1===u.className.indexOf(e.activeLinkClass)&&(u.className+=p+e.activeLinkClass);var C=u.parentNode;C&&-1===C.className.indexOf(e.activeListItemClass)&&(C.className+=p+e.activeListItemClass);var v=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass);d.call(v,function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=p+e.isCollapsedClass)}),u.nextSibling&&-1!==u.nextSibling.className.indexOf(e.isCollapsedClass)&&(u.nextSibling.className=u.nextSibling.className.split(p+e.isCollapsedClass).join("")),c(u.parentNode.parentNode)}}function c(t){return-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(p+e.isCollapsedClass).join(""),c(t.parentNode.parentNode)):t}function a(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(h=!1)}function u(){h=!0}var d=[].forEach,f=[].some,m=document.body,h=!0,p=" ";return{enableTocAnimation:u,disableTocAnimation:a,render:n,updateToc:s}}},function(e,t){e.exports=function(e){function t(e){return e[e.length-1]}function n(e){return+e.nodeName.split("H").join("")}function o(t){var o={id:t.id,children:[],nodeName:t.nodeName,headingLevel:n(t),textContent:t.textContent.trim()};return e.includeHtml&&(o.childNodes=t.childNodes),o}function l(l,r){for(var i=o(l),s=n(l),c=r,a=t(c),u=a?a.headingLevel:0,d=s-u;d>0;)a=t(c),a&&void 0!==a.children&&(c=a.children),d--;return s>=e.collapseDepth&&(i.isCollapsed=!0),c.push(i),c}function r(t,n){var o=n;e.ignoreSelector&&(o=n.split(",").map(function(t){return t.trim()+":not("+e.ignoreSelector+")"}));try{return document.querySelector(t).querySelectorAll(o)}catch(e){return console.warn("Element not found: "+t),null}}function i(e){return s.call(e,function(e,t){return l(o(t),e.nest),e},{nest:[]})}var s=[].reduce;return{nestHeadingsArray:i,selectHeadings:r}}},function(e,t){function n(e){function t(e){return"a"===e.tagName.toLowerCase()&&(e.hash.length>0||"#"===e.href.charAt(e.href.length-1))&&(n(e.href)===s||n(e.href)+"#"===s)}function n(e){return e.slice(0,e.lastIndexOf("#"))}function l(e){var t=document.getElementById(e.substring(1));t&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}!function(){document.documentElement.style}();var r=e.duration,i=e.offset,s=location.hash?n(location.href):location.href;!function(){function n(n){!t(n.target)||n.target.className.indexOf("no-smooth-scroll")>-1||"#"===n.target.href.charAt(n.target.href.length-2)&&"!"===n.target.href.charAt(n.target.href.length-1)||-1===n.target.className.indexOf(e.linkClass)||o(n.target.hash,{duration:r,offset:i,callback:function(){l(n.target.hash)}})}document.body.addEventListener("click",n,!1)}()}function o(e,t){function n(e){i=e-r,window.scrollTo(0,c.easing(i,s,u,d)),iaddInput($logoUrl); + $icoUrl = new Typecho_Widget_Helper_Form_Element_Text('icoUrl', NULL, NULL, _t('站点 Favicon 地址')); + $form->addInput($icoUrl); + $instagramurl = new Typecho_Widget_Helper_Form_Element_Text('instagramurl', NULL, NULL, _t('Instagram'), _t('会在个人信息显示')); + $form->addInput($instagramurl); + $telegramurl = new Typecho_Widget_Helper_Form_Element_Text('telegramurl', NULL, NULL, _t('电报'), _t('会在个人信息显示')); + $form->addInput($telegramurl); + $githuburl = new Typecho_Widget_Helper_Form_Element_Text('githuburl', NULL, NULL, _t('github'), _t('会在个人信息显示')); + $form->addInput($githuburl); + $twitterurl = new Typecho_Widget_Helper_Form_Element_Text('twitterurl', NULL, NULL, _t('twitter'), _t('会在个人信息显示')); + $form->addInput($twitterurl); + $mastodonurl = new Typecho_Widget_Helper_Form_Element_Text('mastodonurl', NULL, NULL, _t('mastodon'), _t('会在个人信息显示')); + $form->addInput($mastodonurl); + $sitemapurl = new Typecho_Widget_Helper_Form_Element_Text('sitemapurl', NULL, NULL, _t('sitemap'), _t('会在页脚显示')); + $form->addInput($sitemapurl); + $cnavatar = new Typecho_Widget_Helper_Form_Element_Text('cnavatar', NULL, 'https://cravatar.cn/avatar/', _t('Gravatar镜像'), _t('默认https://cravatar.cn/avatar/,建议保持默认')); + $form->addInput($cnavatar); + $twikoo = new Typecho_Widget_Helper_Form_Element_Textarea('twikoo', NULL, NULL, _t('引用第三方评论'), _t('不填写则不显示')); + $form->addInput($twikoo); + $addhead = new Typecho_Widget_Helper_Form_Element_Textarea('addhead', NULL, NULL, _t('添加head'), _t('支持HTML')); + $form->addInput($addhead); + $tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, NULL, _t('统计代码'), _t('支持HTML')); + $form->addInput($tongji); + $showtoc = new Typecho_Widget_Helper_Form_Element_Radio('showtoc', + array('0'=> _t('否'), '1'=> _t('是')), + '0', _t('是否显示文章目录'), _t('选择“是”将在文章页面显示文章目录(仅在宽度大于1400px的设备中显示)。')); + $form->addInput($showtoc); +} +function get_post_view($archive) { + $cid = $archive->cid; + $db = Typecho_Db::get(); + $prefix = $db->getPrefix(); + if (!array_key_exists('views', $db->fetchRow($db->select()->from('table.contents')))) { + $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `views` INT(10) DEFAULT 0;'); + echo 0; + return; + } + $row = $db->fetchRow($db->select('views')->from('table.contents')->where('cid = ?', $cid)); + if ($archive->is('single')) { + $views = Typecho_Cookie::get('extend_contents_views'); + if (empty($views)) { + $views = array(); + } else { + $views = explode(',', $views); + } + if (!in_array($cid, $views)) { + $db->query($db->update('table.contents')->rows(array('views' => (int)$row['views'] + 1))->where('cid = ?', $cid)); + array_push($views, $cid); + $views = implode(',', $views); + Typecho_Cookie::set('extend_contents_views', $views); //记录查看cookie + + } + } + echo $row['views']; +} +// 获取Typecho的选项 +$options = Typecho_Widget::widget('Widget_Options'); +// 检查cnavatar是否已设置,如果未设置或为空,则使用默认的Gravatar前缀 +$gravatarPrefix = empty($options->cnavatar) ? 'https://cravatar.cn/avatar/' : $options->cnavatar; +// 定义全局常量__TYPECHO_GRAVATAR_PREFIX__,用于存储Gravatar前缀 +define('__TYPECHO_GRAVATAR_PREFIX__', $gravatarPrefix); +/** +* 页面加载时间 +*/ +function timer_start() { + global $timestart; + $mtime = explode( ' ', microtime() ); + $timestart = $mtime[1] + $mtime[0]; + return true; + } + timer_start(); + function timer_stop( $display = 0, $precision = 3 ) { + global $timestart, $timeend; + $mtime = explode( ' ', microtime() ); + $timeend = $mtime[1] + $mtime[0]; + $timetotal = number_format( $timeend - $timestart, $precision ); + $r = $timetotal < 1 ? $timetotal * 1000 . " ms" : $timetotal . " s"; + if ( $display ) { + echo $r; + } + return $r; + } + +/* + * 全站字数 + */ +function allwords() { + $chars = 0; + $db = Typecho_Db::get(); + $select = $db ->select('text')->from('table.contents');//如果只要统计文章总字数不要统计单页的话可在后面加入->where('type = ?','post') + $rows = $db->fetchAll($select); + foreach ($rows as $row) { $chars += mb_strlen(trim($row['text']), 'UTF-8'); } + if($chars<50000){ + echo '全站共 '.$chars.' 字,还在努力更新中,加油!加油啦!';} + elseif ($chars<70000 && $chars>50000){ + echo '全站共 '.$chars.' 字,写完一本埃克苏佩里的《小王子》了!';} + elseif ($chars<90000 && $chars>70000){ + echo '全站共 '.$chars.' 字,写完一本鲁迅的《呐喊》了!';} + elseif ($chars<100000 && $chars>90000){ + echo '全站共 '.$chars.' 字,写完一本林海音的《城南旧事》了!';} + elseif ($chars<110000 && $chars>100000){ + echo '全站共 '.$chars.' 字,写完一本马克·吐温的《王子与乞丐》了!';} + elseif ($chars<120000 && $chars>110000){ + echo '全站共 '.$chars.' 字,写完一本鲁迅的《彷徨》了!';} + elseif ($chars<130000 && $chars>120000){ + echo '全站共 '.$chars.' 字,写完一本余华的《活着》了!';} + elseif ($chars<140000 && $chars>130000){ + echo '全站共 '.$chars.' 字,写完一本曹禺的《雷雨》了!';} + elseif ($chars<150000 && $chars>140000){ + echo '全站共 '.$chars.' 字,写完一本史铁生的《宿命的写作》了!';} + elseif ($chars<160000 && $chars>150000){ + echo '全站共 '.$chars.' 字,写完一本伯内特的《秘密花园》了!';} + elseif ($chars<170000 && $chars>160000){ + echo '全站共 '.$chars.' 字,写完一本曹禺的《日出》了!';} + elseif ($chars<180000 && $chars>170000){ + echo '全站共 '.$chars.' 字,写完一本马克·吐温的《汤姆·索亚历险记》了!';} + elseif ($chars<190000 && $chars>180000){ + echo '全站共 '.$chars.' 字,写完一本沈从文的《边城》了!';} + elseif ($chars<200000 && $chars>190000){ + echo '全站共 '.$chars.' 字,写完一本亚米契斯的《爱的教育》了!';} + elseif ($chars<210000 && $chars>200000){ + echo '全站共 '.$chars.' 字,写完一本巴金的《寒夜》了!';} + elseif ($chars<220000 && $chars>210000){ + echo '全站共 '.$chars.' 字,写完一本东野圭吾的《解忧杂货店》了!';} + elseif ($chars<230000 && $chars>220000){ + echo '全站共 '.$chars.' 字,写完一本莫泊桑的《一生》了!';} + elseif ($chars<250000 && $chars>230000){ + echo '全站共 '.$chars.' 字,写完一本简·奥斯汀的《傲慢与偏见》了!';} + elseif ($chars<280000 && $chars>250000){ + echo '全站共 '.$chars.' 字,写完一本钱钟书的《围城》了!';} + elseif ($chars<300000 && $chars>280000){ + echo '全站共 '.$chars.' 字,写完一本张炜的《古船》了!';} + elseif ($chars<310000 && $chars>300000){ + echo '全站共 '.$chars.' 字,写完一本茅盾的《子夜》了!';} + elseif ($chars<320000 && $chars>310000){ + echo '全站共 '.$chars.' 字,写完一本阿来的《尘埃落定》了!';} + elseif ($chars<340000 && $chars>320000){ + echo '全站共 '.$chars.' 字,写完一本艾米莉·勃朗特的《呼啸山庄》了!';} + elseif ($chars<350000 && $chars>340000){ + echo '全站共 '.$chars.' 字,写完一本雨果的《巴黎圣母院》了!';} + elseif ($chars<400000 && $chars>350000){ + echo '全站共 '.$chars.' 字,写完一本东野圭吾的《白夜行》了!';} + elseif ($chars<1000000 && $chars>400000){ + echo '全站共 '.$chars.' 字,写完一本我国著名的四大名著了!';} + elseif ($chars>1000000){ + echo '全站共 '.$chars.' 字,已写一本列夫·托尔斯泰的《战争与和平》了!';} +} \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..69746c8 --- /dev/null +++ b/index.php @@ -0,0 +1,15 @@ +need('part/head.php'); +?> +
    +need('part/header.php'); ?> +need('part/profile.php'); ?> +need('part/footer.php'); ?> \ No newline at end of file diff --git a/page-archives.php b/page-archives.php new file mode 100644 index 0000000..34ffe7d --- /dev/null +++ b/page-archives.php @@ -0,0 +1,52 @@ + +need('part/head.php'); ?> +
    +need('part/header.php'); ?> +
    +
    +

    -  title() ?>  -

    + publishedPostsNum)->to($archives); + $year = 0; $mon = 0; + $output = '
    '; // Start archives container + while ($archives->next()) { + $year_tmp = date('Y', $archives->created); + $mon_tmp = date('m', $archives->created); + // 检查是否需要新的年份标题 + if ($year != $year_tmp) { + if ($year > 0) { + $output .= ' '; // 结束上一个年份的月份列表和包裹的div + } + $year = $year_tmp; + $mon = 0; // 重置月份 + $output .= '

    ' . $year . '

    '; // 开始新的年份div + } + + // 输出文章项 + $output .= ''; + } + // 循环后,确保所有标签都已经关闭 + if ($mon > 0) { + $output .= ''; // 结束最后一个月份的列表 + } + if ($year > 0) { + $output .= '
    '; // 结束最后一个年份的div + } + $output .= '
    '; // End archives container + echo $output; + ?> +
    +
    +
    + +need('part/footer.php'); ?> + \ No newline at end of file diff --git a/page-categories.php b/page-categories.php new file mode 100644 index 0000000..df962e4 --- /dev/null +++ b/page-categories.php @@ -0,0 +1,51 @@ + +need('part/head.php'); ?> +
    +need('part/header.php'); ?> +
    +
    +
    +

    -  title() ?>  -

    +
    +widget('Widget_Metas_Category_List')->to($categories); ?> +next()): ?> +
    +
    + +

    + + name(); ?> +

    +
    + widget('Widget_Archive@category_' . $categories->mid, 'pageSize=5&type=category', 'mid=' . $categories->mid)->to($posts); + ?> + have()): ?> + next()): ?> + + + + More >> + +

    该分类下没有文章。

    + +
    +
    + + + +
    +
    +
    + +need('part/footer.php'); ?> + \ No newline at end of file diff --git a/page-links.php b/page-links.php new file mode 100644 index 0000000..debdf79 --- /dev/null +++ b/page-links.php @@ -0,0 +1,123 @@ + +need('part/head.php');?> +need('part/header.php'); ?> +
    +
    +
    +

    -  title() ?>  -

    +
    +
    + +allow('comment')): ?> + + options->twikoo): ?> + options->twikoo(); ?> + + + need('comments.php'); ?> + + +
    +
    +
    +need('part/footer.php'); ?> + \ No newline at end of file diff --git a/page-tags.php b/page-tags.php new file mode 100644 index 0000000..ec17020 --- /dev/null +++ b/page-tags.php @@ -0,0 +1,26 @@ + +need('part/head.php'); ?> +
    +need('part/header.php'); ?> +
    +
    +
    +

    -  title() ?>  -

    + widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0')->to($tags); ?> + have()): ?> +
    + next()): ?> + + +
    + +

    + +
    +need('part/footer.php'); ?> \ No newline at end of file diff --git a/page.php b/page.php new file mode 100644 index 0000000..7ecb87e --- /dev/null +++ b/page.php @@ -0,0 +1,25 @@ + +need('part/head.php');?> +need('part/header.php'); ?> +
    +
    +
    +

    -  title() ?>  -

    +
    + content(); ?> +
    + +allow('comment')): ?> + + options->twikoo): ?> + options->twikoo(); ?> + + + need('comments.php'); ?> + + +
    +
    +
    +need('part/footer.php'); ?> + \ No newline at end of file diff --git a/part/footer.php b/part/footer.php new file mode 100644 index 0000000..be0312a --- /dev/null +++ b/part/footer.php @@ -0,0 +1,10 @@ + +
    + + options->tongji(); ?> +
    +
    + + \ No newline at end of file diff --git a/part/head.php b/part/head.php new file mode 100644 index 0000000..c731362 --- /dev/null +++ b/part/head.php @@ -0,0 +1,28 @@ + + + + + + + + + + + + <?php if($this->_currentPage>1) echo '第 '.$this->_currentPage.' 页 - '; ?><?php $this->archiveTitle(array( + 'category' => _t('分类 %s 下的文章'), + 'search' => _t('包含关键字 %s 的文章'), + 'tag' => _t('标签 %s 下的文章'), + 'date' => _t('在<span> %s </span>发布的文章'), + 'author' => _t('%s 发布的文章') + ), '', ' - '); ?><?php if ($this->is('post')) $this->category(',', false);?><?php if ($this->is('post')) echo ' - ';?><?php $this->options->title(); ?><?php if ($this->is('index')) echo ' - '; ?><?php if ($this->is('index')) $this->options->description() ?> + + + + + +header("generator=&template=&pingback=&wlw=&xmlrpc=&rss1=&atom=&rss2=/feed"); ?> +options->addhead(); ?> +header(); ?> + + \ No newline at end of file diff --git a/part/header.php b/part/header.php new file mode 100644 index 0000000..59166d5 --- /dev/null +++ b/part/header.php @@ -0,0 +1,48 @@ + +
    + + +
    + diff --git a/part/paginator.php b/part/paginator.php new file mode 100644 index 0000000..eeb1878 --- /dev/null +++ b/part/paginator.php @@ -0,0 +1,67 @@ + + + + +pagenav( + '', + '', + 1, + '...', + array( + 'wrapTag' => 'div', + 'wrapClass' => 'pagination_page', + 'itemTag' => '', + 'textTag' => 'a', + 'currentClass' => 'active', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ) + ); + ?> + + + + + \ No newline at end of file diff --git a/part/profile.php b/part/profile.php new file mode 100644 index 0000000..1d5274f --- /dev/null +++ b/part/profile.php @@ -0,0 +1,11 @@ + +
    +
    +
    + +
    author(); ?>
    +

    options->description() ?>

    + +
    +
    +
    \ No newline at end of file diff --git a/part/sns.php b/part/sns.php new file mode 100644 index 0000000..a6fbe9f --- /dev/null +++ b/part/sns.php @@ -0,0 +1,29 @@ + + + + +options->telegramurl): ?> + + + + +options->twitterurl): ?> + + + + +options->instagramurl): ?> + + + + +options->githuburl): ?> + + + + +options->mastodonurl): ?> + + + + \ No newline at end of file diff --git a/part/toc.php b/part/toc.php new file mode 100644 index 0000000..eb49bc1 --- /dev/null +++ b/part/toc.php @@ -0,0 +1,60 @@ + +
    +
    +
    + +
    + \ No newline at end of file diff --git a/post.php b/post.php new file mode 100644 index 0000000..cb6f199 --- /dev/null +++ b/post.php @@ -0,0 +1,80 @@ + +need('part/head.php'); ?> +
    +need('part/header.php'); ?> +
    +
    +
    +
    +

    title() ?>

    + +
    +
    + content(); ?> +
    +
    + + +
    + +
    + + +
    + +allow('comment')): ?> + + options->twikoo): ?> + options->twikoo(); ?> + + + need('comments.php'); ?> + + +
    +
    +
    +need('part/toc.php'); ?> +need('part/footer.php'); ?> +