This commit is contained in:
浪子 2024-05-17 16:02:08 +08:00
parent 85e58d7e6f
commit 78b4d4969e
21 changed files with 654 additions and 1066 deletions

View File

@ -12,7 +12,7 @@
'author' => _t('作者 <span>%s </span>发布的文章')
), '', ''); ?></h2>
<h3 class="post--single__subtitle"><?php $this->categorydescription(); ?></h3>
</header>
</header>
<?php while($this->next()): ?>
<article class="post--item" itemtype="http://schema.org/Article" itemscope="itemscope" >
@ -50,17 +50,21 @@
</div>
<div class="description">
<?php $this->excerpt(180); ?>
</div>
</article>
</div>
<?php endwhile; ?>
<?php else: ?>
<div class="page404">
<h2>404 - 页面没找到</h2>
<p>你想查看的页面已被转移或删除了</p>
<header class="archive-header archive-header__search">
<div class="pagination">
<h2>Sorry</h2>
<p>很遗憾,未找到您想看的内容</p>
</div>
<?php endif; ?>
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</header>
</article>
</main>
</div>
<?php $this->need('footer.php'); ?>

View File

@ -1,15 +1,80 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<main class="site--main">
<div class="post--ingle__comments">
<h3 class="comments--title"><svg viewBox="0 0 24 24" class="icon" aria-hidden="true" width="16" height="16">
<div class="post--ingle__comments">
<div id="comments" class="responsesWrapper">
<?php $this->comments()->to($comments); ?>
<?php if($this->allow('comment')): ?>
<?php if ($this->is('attachment')) : ?>
<?php _e(''); ?>
<?php else: ?>
<div id="<?php $this->respondId(); ?>" class="respond comment-respond">
<div class="cancel-comment-reply cancel-comment-reply-link">
<?php $comments->cancelReply(); ?>
</div>
<h3 class="comments--title">
<svg viewBox="0 0 24 24" class="icon" aria-hidden="true" width="16" height="16">
<g>
<path
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">
</path>
</g>
</svg><?php _e('评论'); ?>
</svg><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?>
</h3>
<?php $this->options->twikoo(); ?>
<?php if ($comments->have()): ?>
<nav class="commentnav u-textAlignCenter"></nav>
<ol class="commentlist sulliComment--list"> </ol>
<?php $comments->listComments(); ?>
<?php
$comments->pageNav(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" fill="var(--main)"></path></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.1714 12.0007L8.22168 7.05093L9.63589 5.63672L15.9999 12.0007L9.63589 18.3646L8.22168 16.9504L13.1714 12.0007Z" fill="var(--main)"></path></svg>',
1,
'...',
array(
'wrapTag' => 'div',
'wrapClass' => 'cat_pagination_page',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
)
);
?>
<?php endif; ?>
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form" class="comment-form">
<?php if($this->user->hasLogin()): ?>
<p><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> &raquo;</a></p>
<?php else: ?>
<p class="comment-form-author">
<input placeholder="称呼 *" type="text" name="author" id="author" class="text" value="" required />
</p>
<p class="comment-notes">
<input placeholder="邮箱<?php if ($this->options->commentsRequireMail): ?> *<?php endif; ?>" type="email" name="mail" id="mail" class="text" value=""<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
</p>
<p class="comment-form-url">
<input type="url" name="url" id="url" class="text" placeholder="http(s)://<?php if ($this->options->commentsRequireURL): ?> *<?php endif; ?>" value=""<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
</p>
<?php endif; ?>
<p class="comment-form-comment">
<textarea rows="8" cols="50" name="text" id="textarea" class="textarea" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('misubmit').click();return false};" placeholder="<?php _e('评论审核后显示,请勿重复提交...'); ?>" required ><?php $this->remember('text'); ?></textarea>
</p>
<p class="form-submit">
<button type="submit" class="submit" id="misubmit"><?php _e('提交评论Ctrl+Enter'); ?></button>
</p>
</form>
</div>
</main>
<?php endif; ?>
<?php else: ?>
<?php _e(''); ?>
<?php endif; ?>
<?php $this->options->twikoo(); ?>
</div>
</div>
</main>

View File

@ -1 +0,0 @@
.md-view *{box-sizing:border-box;color:#424242}.md-h1,.md-h2,.md-h3,.md-h4,.md-h5,.md-h6{font-weight:700}.md-code{display:block;margin:1rem 0;padding:1rem;color:#f5f5f5;border-radius:5px;background-color:#424242}.md-code-inline{display:inline-block;padding:.125rem .25rem;color:#ef6c00;background-color:#fff3e0}.md-ul,.md-ol{padding-left:2rem;margin:1rem 0}.md-ul>li,.md-ol>li{margin-top:.5rem}.md-ul>li:first-child,.md-ol>li:first-child{margin-top:0}.md-ul ul,.md-ol ul{margin:.5rem 0 0 0}.md-blockquote{display:block;padding:1rem 0 1rem 1rem;margin:1rem 0;border-left:.5rem solid #bdbdbd;border-radius:5px;background-color:#eee;overflow:auto;word-break:break-word !important}.md-a{position:relative;cursor:pointer;text-decoration:underline transparent;color:#ef6c00}.md-a::before{content:"";border-bottom:.1rem solid #ef6c00;position:absolute;bottom:0;left:0;width:0;transition:width .3s ease}.md-a:hover::before{width:100%}.md-hr{border:0;border-top:.09rem dashed #bdbdbd;border-bottom:0;margin:.5rem 0}.md-sub,.md-sup{font-size:.75rem}.md-sub{bottom:-.25rem}.md-sup{top:-.25rem}.md-img{margin:1rem 0;padding:.5rem;background-color:#eee;border-radius:5px;max-width:100%}.md-strong{font-weight:700}.md-em{font-style:italic}.md-del{text-decoration:line-through}.md-mark{background-color:#ffeb3b}.md-table-outer{width:100%;overflow:auto}.md-table{border-collapse:collapse;display:table;width:100%;text-align:center;margin:1rem 0}.md-thead{background-color:#eceff1}.md-th,.md-td{padding:.5rem;border:.0625rem solid #d5d5d5;white-space:nowrap}.md-th{font-weight:700}.md-tr:nth-child(even){background-color:#eee}

3
dist/css/prism.css vendored
View File

@ -1,3 +0,0 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript&plugins=highlight-keywords+autoloader */
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}

246
dist/css/prism1.css vendored
View File

@ -1,246 +0,0 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+aspnet+c+csharp+cpp+css-extras+git+go+java+jq+json+json5+jsonp+markup-templating+php+plsql+python+sql&plugins=line-numbers+show-language+toolbar+copy-to-clipboard */
code[class*=language-],
pre[class*=language-] {
color: #ccc;
background: 0 0;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto
}
:not(pre)>code[class*=language-],
pre[class*=language-] {
background: #2d2d2d
}
:not(pre)>code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}
.token.block-comment,
.token.cdata,
.token.comment,
.token.doctype,
.token.prolog {
color: #999
}
.token.punctuation {
color: #ccc
}
.token.attr-name,
.token.deleted,
.token.namespace,
.token.tag {
color: #e2777a
}
.token.function-name {
color: #6196cc
}
.token.boolean,
.token.function,
.token.number {
color: #f08d49
}
.token.class-name,
.token.constant,
.token.property,
.token.symbol {
color: #f8c555
}
.token.atrule,
.token.builtin,
.token.important,
.token.keyword,
.token.selector {
color: #cc99cd
}
.token.attr-value,
.token.char,
.token.regex,
.token.string,
.token.variable {
color: #7ec699
}
.token.entity,
.token.operator,
.token.url {
color: #67cdcc
}
.token.bold,
.token.important {
font-weight: 700
}
.token.italic {
font-style: italic
}
.token.entity {
cursor: help
}
.token.inserted {
color: green
}
pre[class*=language-].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber
}
pre[class*=language-].line-numbers>code {
position: relative;
white-space: inherit
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em;
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.line-numbers-rows>span {
display: block;
counter-increment: linenumber
}
.line-numbers-rows>span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: .8em;
text-align: right
}
div.code-toolbar {
position: relative
}
div.code-toolbar>.toolbar {
position: absolute;
z-index: 10;
top: .3em;
right: .2em;
transition: opacity .3s ease-in-out;
opacity: 0
}
div.code-toolbar:hover>.toolbar {
opacity: 1
}
div.code-toolbar:focus-within>.toolbar {
opacity: 1
}
div.code-toolbar>.toolbar>.toolbar-item {
display: inline-block
}
div.code-toolbar>.toolbar>.toolbar-item>a {
cursor: pointer
}
div.code-toolbar>.toolbar>.toolbar-item>button {
background: 0 0;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none
}
div.code-toolbar>.toolbar>.toolbar-item>a,
div.code-toolbar>.toolbar>.toolbar-item>button,
div.code-toolbar>.toolbar>.toolbar-item>span {
color: #bbb;
font-size: .8em;
padding: 0 .5em;
background: #f5f2f0;
background: rgba(224, 224, 224, .2);
box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2);
border-radius: .5em
}
div.code-toolbar>.toolbar>.toolbar-item>a:focus,
div.code-toolbar>.toolbar>.toolbar-item>a:hover,
div.code-toolbar>.toolbar>.toolbar-item>button:focus,
div.code-toolbar>.toolbar>.toolbar-item>button:hover,
div.code-toolbar>.toolbar>.toolbar-item>span:focus,
div.code-toolbar>.toolbar>.toolbar-item>span:hover {
color: inherit;
text-decoration: none
}
.pre-mac {
position: relative;
margin-top: -7px;
top: 21px;
left: 10px;
width: 100px;
z-index: 99;
}
.pre-mac>span {
float: left;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 5px;
}
.pre-mac>span:nth-child(1) {
background: red;
}
.pre-mac>span:nth-child(2) {
background: sandybrown;
}
.pre-mac>span:nth-child(3) {
background: limegreen;
}

View File

@ -4015,5 +4015,82 @@ textarea {
.heatmap_day_level_4 {
background-color: var(--ht-lv-4)
}
/* 分页 */
.cat_pagination_page{
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--margin);
gap: 0.5rem;
}
.cat_pagination_page li.active a {
background: var(--theme);
color: #fff;
font-weight: 500;
}
.cat_pagination_page a{
display: flex;
padding: 0.5rem;
font-size: 0.9rem;
width: 1.75rem;
height: 1.75rem;
background: var(--background);
border-radius: 50%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: 0.2s;
-webkit-transition: 0.2s;
justify-content: center;
align-items: center;
letter-spacing: 0;
}
.cat_pagination_page span.next{
cursor: pointer;
}
.cat_pagination_page li.active a:hover{
cursor: not-allowed;
}
/* 分页 */
.cat_archive_next {
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--margin);
}
.cat_archive_next .next{
color: var(--C);
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
background: var(--background);
border-radius: 1rem;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
transition: 0.2s;
-webkit-transition: 0.2s;
letter-spacing: 2px;
cursor: pointer;
}
.cat_archive_next .over{
font-size: small;
color: var(--A);
padding: 0.5rem;
text-align: center;
}
.cat_categorymenu{
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.cat_categorymenu a:last-child {
margin-right: auto;
}
.cat_categorymenu a {
display: inline-block;
font-size: 0.9rem;
margin-bottom: 0;
}

File diff suppressed because one or more lines are too long

416
dist/js/bundle.js vendored
View File

@ -1,61 +1,355 @@
(()=>{window.addComment=function(m){var u,p,f,c=m.document,o={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},k=m.MutationObserver||m.WebKitMutationObserver||m.MozMutationObserver,N="querySelector"in c&&"addEventListener"in m,D=!!c.documentElement.dataset;function x(){F(),k&&new k(O).observe(c.body,{childList:!0,subtree:!0})}function F(r){if(N&&(u=i(o.cancelReplyId),p=i(o.commentFormId),u)){let d=function(n){if((n.metaKey||n.ctrlKey)&&n.keyCode===13)return p.removeEventListener("keydown",d),n.preventDefault(),p.submit.click(),!1};var l=d;u.addEventListener("touchstart",L),u.addEventListener("click",L),p&&p.addEventListener("keydown",d);for(var t,a=function(n){var I=o.commentReplyClass;return n&&n.childNodes||(n=c),n=c.getElementsByClassName?n.getElementsByClassName(I):n.querySelectorAll("."+I),n}(r),e=0,y=a.length;e<y;e++)(t=a[e]).addEventListener("touchstart",S),t.addEventListener("click",S)}}function L(r){var t,a,e=i(o.temporaryFormId);e&&f&&(i(o.parentIdFieldId).value="0",t=e.textContent,e.parentNode.replaceChild(f,e),this.style.display="none",a=(e=(e=i(o.commentReplyTitleId))&&e.firstChild)&&e.nextSibling,e&&e.nodeType===Node.TEXT_NODE&&t&&(a&&a.nodeName==="A"&&a.id!==o.cancelReplyId&&(a.style.display=""),e.textContent=t),r.preventDefault())}function S(r){var t=i(o.commentReplyTitleId),t=t&&t.firstChild.textContent,d=this,a=C(d,"belowelement"),e=C(d,"commentid"),y=C(d,"respondelement"),l=C(d,"postid"),d=C(d,"replyto")||t;a&&e&&y&&l&&m.addComment.moveForm(a,e,y,l,d)===!1&&r.preventDefault()}function O(r){for(var t=r.length;t--;)if(r[t].addedNodes.length)return void F()}function C(r,t){return D?r.dataset[t]:r.getAttribute("data-"+t)}function i(r){return c.getElementById(r)}return N&&c.readyState!=="loading"?x():N&&m.addEventListener("DOMContentLoaded",x,!1),{init:F,moveForm:function(h,t,b,e,y){var l,d,n,I,R,v,E,h=i(h),b=(f=i(b),i(o.parentIdFieldId)),w=i(o.postIdFieldId),s=i(o.commentReplyTitleId),g=(s=s&&s.firstChild)&&s.nextSibling;if(h&&f&&b){y===void 0&&(y=s&&s.textContent),I=f,R=o.temporaryFormId,v=i(R),E=(E=i(o.commentReplyTitleId))?E.firstChild.textContent:"",v||((v=c.createElement("div")).id=R,v.style.display="none",v.textContent=E,I.parentNode.insertBefore(v,I)),e&&w&&(w.value=e),b.value=t,u.style.display="",h.parentNode.insertBefore(f,h.nextSibling),s&&s.nodeType===Node.TEXT_NODE&&(g&&g.nodeName==="A"&&g.id!==o.cancelReplyId&&(g.style.display="none"),s.textContent=y),u.onclick=function(){return!1};try{for(var T=0;T<p.elements.length;T++)if(l=p.elements[T],d=!1,"getComputedStyle"in m?n=m.getComputedStyle(l):c.documentElement.currentStyle&&(n=l.currentStyle),(l.offsetWidth<=0&&l.offsetHeight<=0||n.visibility==="hidden")&&(d=!0),l.type!=="hidden"&&!l.disabled&&!d){l.focus();break}}catch{}return!1}}}}(window);})();
/*! This file is auto-generated */
;
(()=>{var d=class{ver;type;finished;paged;genre_list;subjects;genre;baseAPI="https://node.wpista.com/v1/outer/";token;constructor(e){this.ver="1.0.1",this.type="movie",this.finished=!1,this.paged=1,this.genre_list=[],this.genre=[],this.subjects=[],this.token=e.token,this._create()}on(e,t,s){var a=document.querySelectorAll(t);a.forEach(n=>{n.addEventListener(e,s)})}_fetchGenres(){document.querySelector(".db--genres").innerHTML="",fetch(this.baseAPI+"genres?token="+this.token+"&type="+this.type).then(e=>e.json()).then(e=>{e.data.length&&(this.genre_list=e.data,this._renderGenre())})}_handleGenreClick(){this.on("click",".db--genreItem",e=>{let t=e.currentTarget;if(t.classList.contains("is-active")){let s=this.genre.indexOf(t.innerText);t.classList.remove("is-active"),this.genre.splice(s,1),this.paged=1,this.finished=!1,this.subjects=[],this._fetchData();return}document.querySelector(".db--list").innerHTML="",document.querySelector(".lds-ripple").classList.remove("u-hide"),t.classList.add("is-active"),this.genre.push(t.innerText),this.paged=1,this.finished=!1,this.subjects=[],this._fetchData()})}_renderGenre(){document.querySelector(".db--genres").innerHTML=this.genre_list.map(e=>`<span class="db--genreItem${this.genre_list.includes(e.name)?" is-active":""}">${e.name}</span>`).join(""),this._handleGenreClick()}_fetchData(){fetch(this.baseAPI+"faves?token="+this.token+"&type="+this.type+"&paged="+this.paged+"&genre="+JSON.stringify(this.genre)).then(e=>e.json()).then(e=>{e.data.length?(document.querySelector(".db--list").classList.contains("db--list__card")?(this.subjects=[...this.subjects,...e.data],this._randerDateTemplate()):(this.subjects=[...this.subjects,...e.data],this._randerListTemplate()),document.querySelector(".lds-ripple").classList.add("u-hide")):(this.finished=!0,document.querySelector(".lds-ripple").classList.add("u-hide"))})}_randerDateTemplate(){let e=this.subjects.reduce((s,a)=>{let n=new Date(a.create_time),i=n.getFullYear(),r=n.getMonth()+1,l=`${i}-${r.toString().padStart(2,"0")}`;return Object.prototype.hasOwnProperty.call(s,l)?s[l].push(a):s[l]=[a],s},{}),t="";for(let s in e){let a=s.split("-");t+=`<div class="db--listBydate"><div class="db--titleDate "><div class="db--titleDate__day">${a[1]}</div><div class="db--titleDate__month">${a[0]}</div></div><div class="db--dateList__card">`,t+=e[s].map(n=>`<div class="db--item">${n.is_top250?'<span class="top250">Top 250</span>':""}<img src="${n.poster}" referrerpolicy="no-referrer" class="db--image"><div class="db--score ">${n.douban_score>0?'<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" ><path d="M12 20.1l5.82 3.682c1.066.675 2.37-.322 2.09-1.584l-1.543-6.926 5.146-4.667c.94-.85.435-2.465-.799-2.567l-6.773-.602L13.29.89a1.38 1.38 0 0 0-2.581 0l-2.65 6.53-6.774.602C.052 8.126-.453 9.74.486 10.59l5.147 4.666-1.542 6.926c-.28 1.262 1.023 2.26 2.09 1.585L12 20.099z"></path></svg>'+n.douban_score:""}${n.year>0?" \xB7 "+n.year:""}</div><div class="db--title"><a href="${n.link}" target="_blank">${n.name}</a></div></div>`).join(""),t+="</div></div>"}document.querySelector(".db--list").innerHTML=t}_randerListTemplate(){document.querySelector(".db--list").innerHTML=this.subjects.map(e=>`<div class="db--item">${e.is_top250?'<span class="top250">Top 250</span>':""}<img src="${e.poster}" referrerpolicy="no-referrer" class="db--image"><div class="ipc-signpost ">${e.create_time}</div><div class="db--score ">${e.douban_score>0?'<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" ><path d="M12 20.1l5.82 3.682c1.066.675 2.37-.322 2.09-1.584l-1.543-6.926 5.146-4.667c.94-.85.435-2.465-.799-2.567l-6.773-.602L13.29.89a1.38 1.38 0 0 0-2.581 0l-2.65 6.53-6.774.602C.052 8.126-.453 9.74.486 10.59l5.147 4.666-1.542 6.926c-.28 1.262 1.023 2.26 2.09 1.585L12 20.099z"></path></svg>'+e.douban_score:""}${e.year>0?" \xB7 "+e.year:""}</div><div class="db--title"><a href="${e.link}" target="_blank">${e.name}</a></div>
</div>
</div>`).join("")}_handleScroll(){window.addEventListener("scroll",()=>{var e=window.scrollY||window.pageYOffset;document.querySelector(".block-more").offsetTop+-window.innerHeight<e&&document.querySelector(".lds-ripple").classList.contains("u-hide")&&!this.finished&&(document.querySelector(".lds-ripple").classList.remove("u-hide"),this.paged++,this._fetchData())})}_handleNavClick(){this.on("click",".db--navItem",e=>{if(e.currentTarget.classList.contains("current"))return;this.genre=[],this.type=e.currentTarget.dataset.type,this.type!="book"?(this._fetchGenres(),document.querySelector(".db--genres")?.classList.remove("u-hide")):document.querySelector(".db--genres").classList.add("u-hide"),document.querySelector(".db--list").innerHTML="",document.querySelector(".lds-ripple").classList.remove("u-hide"),document.querySelector(".db--navItem.current").classList.remove("current"),e.target.classList.add("current"),this.paged=1,this.finished=!1,this.subjects=[],this._fetchData()})}_create(){if(document.querySelector(".db--container")){let e=document.querySelector(".db--container");if(e.dataset.token)this.token=e.dataset.token;else return;let t=document.querySelector(".db--navItem.current");t instanceof HTMLElement&&(this.type=t.dataset.type);let s=document.querySelector(".db--list");s.dataset.type&&(this.type=s.dataset.type),this.type=="movie"&&document.querySelector(".db--genres").classList.remove("u-hide"),this._fetchGenres(),this._fetchData(),this._handleScroll(),this._handleNavClick()}document.querySelector(".js-db")&&document.querySelectorAll(".js-db").forEach(e=>{let t=e,s=t.dataset.id,a=t.dataset.type,n=t.parentNode;fetch(this.baseAPI+`${a}/${s}?token=${this.token}`).then(i=>{i.json().then(r=>{if(r.data){let l=r.data,c=document.createElement("div");c.classList.add("doulist-item"),c.innerHTML=`<div class="doulist-subject">
<div class="doulist-post"><img decoding="async" referrerpolicy="no-referrer" src="${l.poster}"></div>
<div class="doulist-content">
<div class="doulist-title"><a href="${l.link}" class="cute" target="_blank" rel="external nofollow">${l.name}</a></div>
<div class="rating"><span class="allstardark"><span class="allstarlight" style="width:55%"></span></span><span class="rating_nums"> ${l.douban_score} </span></div>
<div class="abstract">${l.card_subtitle}</div>
</div>
</div>`,n.replaceWith(c)}})})}),document.querySelector(".db--collection")&&document.querySelectorAll(".db--collection").forEach(e=>{this._fetchCollection(e)})}_fetchCollection(e){let t=e.dataset.style?e.dataset.style:"card";fetch(obvInit.api+"v1/movies?type="+e.dataset.type+"&paged=1&genre=&start_time="+e.dataset.start+"&end_time="+e.dataset.end).then(s=>s.json()).then(s=>{if(s.length)if(t=="card")e.innerHTML+=s.map(a=>`<div class="doulist-item">
<div class="doulist-subject">
<div class="db--viewTime ">Marked ${a.create_time}</div>
<div class="doulist-post"><img referrerpolicy="no-referrer" src="${a.poster}"></div><div class="doulist-content"><div class="doulist-title"><a href="${a.link}" class="cute" target="_blank" rel="external nofollow">${a.name}</a></div><div class="rating"><span class="allstardark"><span class="allstarlight" style="width:75%"></span></span><span class="rating_nums">${a.douban_score}</span></div><div class="abstract">${a.remark||a.card_subtitle}</div></div></div></div>`).join("");else{let a=s.reduce((i,r)=>(Object.prototype.hasOwnProperty.call(i,r.create_time)?i[r.create_time].push(r):i[r.create_time]=[r],i),{}),n="";for(let i in a)n+=`<div class="db--date">${i}</div><div class="db--dateList">`,n+=a[i].map(r=>`<div class="db--card__list"">
<img referrerpolicy="no-referrer" src="${r.poster}">
<div>
<div class="title"><a href="${r.link}" class="cute" target="_blank" rel="external nofollow">${r.name}</a></div>
<div class="rating"><span class="allstardark"><span class="allstarlight" style="width:75%"></span></span><span class="rating_nums">${r.douban_score}</span></div>
${r.remark||r.card_subtitle}
</div>
</div>`).join(""),n+="</div>";e.innerHTML=n}})}};new d({token:window.WPD_TOKEN});})();
;
(()=>{var o=class{getCookie(e){if(0<document.cookie.length){var i=document.cookie.indexOf(e+"=");if(i!=-1){i=i+e.length+1;var t=document.cookie.indexOf(";",i);return t==-1&&(t=document.cookie.length),document.cookie.substring(i,t)}}return""}setCookie(e,i,t){var s=new Date;s.setTime(s.getTime()+24*t*60*60*1e3);var d="expires="+s.toUTCString();document.cookie=e+"="+i+";"+d+";path=/"}showNotice(e,i="success"){let t=`<div class="notice--wrapper">${e}</div>`;document.querySelector("body").insertAdjacentHTML("beforeend",t),document.querySelector(".notice--wrapper").classList.add("is-active"),setTimeout(()=>{document.querySelector(".notice--wrapper").remove()},3e3)}};var a=class{selector;timeFormat={second:"second ago",seconds:"seconds ago",minute:"minute ago",minutes:"minutes ago",hour:"hour ago",hours:"hours ago",day:"day ago",days:"days ago",week:"week ago",weeks:"weeks ago",month:"month ago",months:"months ago",year:"year ago",years:"years ago"};doms=[];constructor(e){this.selector=e.selector,e.timeFormat&&(this.timeFormat=e.timeFormat),this.init(),setTimeout(()=>{this.refresh()},1e3*5)}init(){this.doms=Array.from(document.querySelectorAll(this.selector)),this.doms.forEach(e=>{e.innerText=this.humanize_time_ago(e.attributes.datetime.value)})}humanize_time_ago(e){let i=new Date(e),t=Date.now()/1e3-Number(i.getTime()/1e3);return t<3600?`${Math.ceil(t/60)} ${Math.ceil(t/60)==1?this.timeFormat.second:this.timeFormat.seconds}`:t<86400?`${Math.ceil(t/3600)} ${Math.ceil(t/3660)==1?this.timeFormat.hour:this.timeFormat.hours}`:t<86400*30?`${Math.ceil(t/86400)} ${Math.ceil(t/86400)==1?this.timeFormat.day:this.timeFormat.days}`:t<86400*30*12?`${Math.ceil(t/(86400*30))} ${Math.ceil(t/(86400*30))==1?this.timeFormat.month:this.timeFormat.months}`:i.getFullYear()+"-"+(i.getMonth()+1)+"-"+i.getDate()}refresh(){this.doms.forEach(e=>{e.innerText=this.humanize_time_ago(e.attributes.datetime.value)})}},l=a;var n=class extends o{singleSelector=".post--single";likeButtonSelctor=".like-btn";articleSelector=".post--item";viewSelector=".article--views";actionDomain;text="";likeButton=null;post_id;is_single=!1;constructor(e){if(super(),this.singleSelector=e.singleSelector??this.singleSelector,this.likeButtonSelctor=e.likeButtonSelctor??this.likeButtonSelctor,this.articleSelector=e.articleSelector??this.articleSelector,this.viewSelector=e.viewSelector??this.viewSelector,this.actionDomain=e.actionDomain,this.text=e.text??this.text,this.is_single=!!document.querySelector(this.singleSelector),this.is_single){let i=document.querySelector(this.singleSelector);this.post_id=i.dataset.id??"",this.initArticleLike()}}initArticleLike(){this.likeButton=document.querySelector(this.likeButtonSelctor),this.likeButton&&(fetch(this.actionDomain+"post/"+this.post_id+"/like").then(e=>{e.json().then(i=>{this.likeButton.querySelector(".count").innerText=i.likes})}),this.likeButton.addEventListener("click",()=>{this.handleLike()}),this.getCookie("like_"+this.post_id)&&this.likeButton.classList.add("is-active"))}handleLike(){if(this.getCookie("like_"+this.post_id))return this.showNotice("You have already liked this post");if(this.likeButton){let e=this.actionDomain+"post/"+this.post_id+"/like";fetch(e,{method:"post"}).then(i=>i.json()).then(i=>{this.showNotice("Thanks for your like");let t=this.likeButton?.querySelector(".count");t&&(t.innerText=i.likes),this.setCookie("like_"+this.post_id,"1",1)}),this.likeButton?.classList.add("is-active")}}},h=n;var c=class extends o{is_single=!1;post_id=0;is_archive=!1;VERSION="0.4.1";like_btn;selctor=".like-btn";actionDomain=window.actionDomain;constructor(){super(),this.initCopyright(),this.initThemeSwitch(),this.initBack2Top(),this.initSearch()}initSearch(){document.querySelector('[data-action="show-search"]').addEventListener("click",()=>{document.querySelector(".site--header__center .inner").classList.toggle("search--active")})}initBack2Top(){if(document.querySelector(".backToTop")){let e=document.querySelector(".backToTop");window.addEventListener("scroll",()=>{(window.scrollY||window.pageYOffset)>200?e.classList.add("is-active"):e.classList.remove("is-active")}),e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}}initCopyright(){let e=`<div class="site--footer__info">
Theme <a href="https://fatesinger.com/101971" target="_blank">farallon</a> by bigfa / version ${this.VERSION}
</div>`;document.querySelector(".site--footer__content").insertAdjacentHTML("afterend",e),document.querySelector(".icon--copryrights").addEventListener("click",()=>{document.querySelector(".site--footer__info").classList.toggle("active")})}initThemeSwitch(){let e=localStorage.getItem("theme")?localStorage.getItem("theme"):"auto",i=`<div class="fixed--theme">
<span class="${e=="dark"?"is-active":""}" data-action-value="dark">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
</svg>
</span>
<span class="${e=="light"?"is-active":""}" data-action-value="light">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<circle cx="12" cy="12" r="5"></circle>
<path d="M12 1v2"></path>
<path d="M12 21v2"></path>
<path d="M4.22 4.22l1.42 1.42"></path>
<path d="M18.36 18.36l1.42 1.42"></path>
<path d="M1 12h2"></path>
<path d="M21 12h2"></path>
<path d="M4.22 19.78l1.42-1.42"></path>
<path d="M18.36 5.64l1.42-1.42"></path>
</svg>
</span>
<span class="${e=="auto"?"is-active":""}" data-action-value="auto">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<path d="M8 21h8"></path>
<path d="M12 17v4"></path>
</svg>
</span>
</div>`;document.querySelector("body").insertAdjacentHTML("beforeend",i),document.querySelectorAll(".fixed--theme span").forEach(t=>{t.addEventListener("click",()=>{t.classList.contains("is-active")||(document.querySelectorAll(".fixed--theme span").forEach(s=>{s.classList.remove("is-active")}),t.dataset.actionValue=="dark"?(localStorage.setItem("theme","dark"),document.querySelector("body").classList.remove("auto"),document.querySelector("body").classList.add("dark"),t.classList.add("is-active")):t.dataset.actionValue=="light"?(localStorage.setItem("theme","light"),document.querySelector("body").classList.remove("auto"),document.querySelector("body").classList.remove("dark"),t.classList.add("is-active")):t.dataset.actionValue=="auto"&&(localStorage.setItem("theme","auto"),document.querySelector("body").classList.remove("dark"),document.querySelector("body").classList.add("auto"),t.classList.add("is-active")))})})}};new h({singleSelector:".post--single",articleSelector:".post--item",likeButtonSelctor:".like-btn",actionDomain:window.actionDomain});new c;new l({selector:".humane--time",timeFormat:window.timeFormat});})();
(() => {
// <stdin>
window.addComment = function(v) {
var I, C, h, E = v.document, b = { commentReplyClass: "comment-reply-link", commentReplyTitleId: "reply-title", cancelReplyId: "cancel-comment-reply-link", commentFormId: "commentform", temporaryFormId: "wp-temp-form-div", parentIdFieldId: "comment_parent", postIdFieldId: "comment_post_ID" }, e = v.MutationObserver || v.WebKitMutationObserver || v.MozMutationObserver, r = "querySelector" in E && "addEventListener" in v, n = !!E.documentElement.dataset;
function t() {
d(), e && new e(o).observe(E.body, { childList: true, subtree: true });
}
function d(e2) {
if (r && (I = g(b.cancelReplyId), C = g(b.commentFormId), I)) {
let t3 = function(e3) {
if ((e3.metaKey || e3.ctrlKey) && 13 === e3.keyCode)
return C.removeEventListener("keydown", t3), e3.preventDefault(), C.submit.click(), false;
};
var t2 = t3;
I.addEventListener("touchstart", l), I.addEventListener("click", l);
C && C.addEventListener("keydown", t3);
for (var n2, d2 = function(e3) {
var t4 = b.commentReplyClass;
e3 && e3.childNodes || (e3 = E);
e3 = E.getElementsByClassName ? e3.getElementsByClassName(t4) : e3.querySelectorAll("." + t4);
return e3;
}(e2), o2 = 0, i = d2.length; o2 < i; o2++)
(n2 = d2[o2]).addEventListener("touchstart", a), n2.addEventListener("click", a);
}
}
function l(e2) {
var t2, n2, d2 = g(b.temporaryFormId);
d2 && h && (g(b.parentIdFieldId).value = "0", t2 = d2.textContent, d2.parentNode.replaceChild(h, d2), this.style.display = "none", n2 = (d2 = (d2 = g(b.commentReplyTitleId)) && d2.firstChild) && d2.nextSibling, d2 && d2.nodeType === Node.TEXT_NODE && t2 && (n2 && "A" === n2.nodeName && n2.id !== b.cancelReplyId && (n2.style.display = ""), d2.textContent = t2), e2.preventDefault());
}
function a(e2) {
var t2 = g(b.commentReplyTitleId), t2 = t2 && t2.firstChild.textContent, n2 = this, d2 = m(n2, "belowelement"), o2 = m(n2, "commentid"), i = m(n2, "respondelement"), r2 = m(n2, "postid"), n2 = m(n2, "replyto") || t2;
d2 && o2 && i && r2 && false === v.addComment.moveForm(d2, o2, i, r2, n2) && e2.preventDefault();
}
function o(e2) {
for (var t2 = e2.length; t2--; )
if (e2[t2].addedNodes.length)
return void d();
}
function m(e2, t2) {
return n ? e2.dataset[t2] : e2.getAttribute("data-" + t2);
}
function g(e2) {
return E.getElementById(e2);
}
return r && "loading" !== E.readyState ? t() : r && v.addEventListener("DOMContentLoaded", t, false), { init: d, moveForm: function(e2, t2, n2, d2, o2) {
var i, r2, l2, a2, m2, c, s, e2 = g(e2), n2 = (h = g(n2), g(b.parentIdFieldId)), y = g(b.postIdFieldId), p = g(b.commentReplyTitleId), u = (p = p && p.firstChild) && p.nextSibling;
if (e2 && h && n2) {
void 0 === o2 && (o2 = p && p.textContent), a2 = h, m2 = b.temporaryFormId, c = g(m2), s = (s = g(b.commentReplyTitleId)) ? s.firstChild.textContent : "", c || ((c = E.createElement("div")).id = m2, c.style.display = "none", c.textContent = s, a2.parentNode.insertBefore(c, a2)), d2 && y && (y.value = d2), n2.value = t2, I.style.display = "", e2.parentNode.insertBefore(h, e2.nextSibling), p && p.nodeType === Node.TEXT_NODE && (u && "A" === u.nodeName && u.id !== b.cancelReplyId && (u.style.display = "none"), p.textContent = o2), I.onclick = function() {
return false;
};
try {
for (var f = 0; f < C.elements.length; f++)
if (i = C.elements[f], r2 = false, "getComputedStyle" in v ? l2 = v.getComputedStyle(i) : E.documentElement.currentStyle && (l2 = i.currentStyle), (i.offsetWidth <= 0 && i.offsetHeight <= 0 || "hidden" === l2.visibility) && (r2 = true), "hidden" !== i.type && !i.disabled && !r2) {
i.focus();
break;
}
} catch (e3) {
}
return false;
}
} };
}(window);
})();
/*! This file is auto-generated */
;
(() => {
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\utils.ts
var farallonHelper = class {
getCookie(t) {
if (0 < document.cookie.length) {
var e = document.cookie.indexOf(t + "=");
if (-1 != e) {
e = e + t.length + 1;
var n = document.cookie.indexOf(";", e);
return -1 == n && (n = document.cookie.length), document.cookie.substring(e, n);
}
}
return "";
}
setCookie(t, e, n) {
var o = /* @__PURE__ */ new Date();
o.setTime(o.getTime() + 24 * n * 60 * 60 * 1e3);
var i = "expires=" + o.toUTCString();
document.cookie = t + "=" + e + ";" + i + ";path=/";
}
showNotice(message, type = "success") {
const html = `<div class="notice--wrapper">${message}</div>`;
document.querySelector("body").insertAdjacentHTML("beforeend", html);
document.querySelector(".notice--wrapper").classList.add("is-active");
setTimeout(() => {
document.querySelector(".notice--wrapper").remove();
}, 3e3);
}
};
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\date.ts
var farallonDate = class {
selector;
timeFormat = {
second: "second ago",
seconds: "seconds ago",
minute: "minute ago",
minutes: "minutes ago",
hour: "hour ago",
hours: "hours ago",
day: "day ago",
days: "days ago",
week: "week ago",
weeks: "weeks ago",
month: "month ago",
months: "months ago",
year: "year ago",
years: "years ago"
};
doms = [];
constructor(config) {
this.selector = config.selector;
if (config.timeFormat) {
this.timeFormat = config.timeFormat;
}
this.init();
setTimeout(() => {
this.refresh();
}, 1e3 * 5);
}
init() {
this.doms = Array.from(document.querySelectorAll(this.selector));
this.doms.forEach((dom) => {
dom.innerText = this.humanize_time_ago(
dom.attributes["datetime"].value
);
});
}
humanize_time_ago(datetime) {
const time = new Date(datetime);
const between = Date.now() / 1e3 - Number(time.getTime() / 1e3);
if (between < 3600) {
return `${Math.ceil(between / 60)} ${Math.ceil(between / 60) == 1 ? this.timeFormat.second : this.timeFormat.seconds}`;
} else if (between < 86400) {
return `${Math.ceil(between / 3600)} ${Math.ceil(between / 3660) == 1 ? this.timeFormat.hour : this.timeFormat.hours}`;
} else if (between < 86400 * 30) {
return `${Math.ceil(between / 86400)} ${Math.ceil(between / 86400) == 1 ? this.timeFormat.day : this.timeFormat.days}`;
} else if (between < 86400 * 30 * 12) {
return `${Math.ceil(between / (86400 * 30))} ${Math.ceil(between / (86400 * 30)) == 1 ? this.timeFormat.month : this.timeFormat.months}`;
} else {
return time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
}
}
refresh() {
this.doms.forEach((dom) => {
dom.innerText = this.humanize_time_ago(
dom.attributes["datetime"].value
);
});
}
};
var date_default = farallonDate;
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\action.ts
var farallonActions = class extends farallonHelper {
singleSelector = ".post--single";
likeButtonSelctor = ".like-btn";
articleSelector = ".post--item";
viewSelector = ".article--views";
actionDomain;
text = "";
likeButton = null;
post_id;
is_single = false;
constructor(config) {
super();
this.singleSelector = config.singleSelector ?? this.singleSelector;
this.likeButtonSelctor = config.likeButtonSelctor ?? this.likeButtonSelctor;
this.articleSelector = config.articleSelector ?? this.articleSelector;
this.viewSelector = config.viewSelector ?? this.viewSelector;
this.actionDomain = config.actionDomain;
this.text = config.text ?? this.text;
this.is_single = document.querySelector(this.singleSelector) ? true : false;
if (this.is_single) {
const postSingle = document.querySelector(
this.singleSelector
);
this.post_id = postSingle.dataset.id ?? "";
this.initArticleLike();
}
}
initArticleLike() {
this.likeButton = document.querySelector(this.likeButtonSelctor);
if (this.likeButton) {
fetch(this.actionDomain + "post/" + this.post_id + "/like").then(
(res) => {
res.json().then((data) => {
this.likeButton.querySelector(
".count"
).innerText = data.likes;
});
}
);
this.likeButton.addEventListener("click", () => {
this.handleLike();
});
if (this.getCookie("like_" + this.post_id)) {
this.likeButton.classList.add("is-active");
}
}
}
handleLike() {
if (this.getCookie("like_" + this.post_id)) {
return this.showNotice("You have already liked this post");
}
if (this.likeButton) {
const url = this.actionDomain + "post/" + this.post_id + "/like";
fetch(url, {
method: "post"
}).then((response) => {
return response.json();
}).then((data) => {
this.showNotice("Thanks for your like");
const countElement = this.likeButton?.querySelector(
".count"
);
if (countElement) {
countElement.innerText = data.likes;
}
this.setCookie("like_" + this.post_id, "1", 1);
});
this.likeButton?.classList.add("is-active");
}
}
};
var action_default = farallonActions;
// <stdin>
var farallonBase = class extends farallonHelper {
is_single = false;
post_id = 0;
is_archive = false;
VERSION = "0.4.1";
like_btn;
selctor = ".like-btn";
// @ts-ignore
actionDomain = window.actionDomain;
constructor() {
super();
this.initCopyright();
this.initThemeSwitch();
this.initBack2Top();
this.initSearch();
}
initSearch() {
document.querySelector('[data-action="show-search"]').addEventListener("click", () => {
document.querySelector(".site--header__center .inner").classList.toggle("search--active");
});
}
initBack2Top() {
if (document.querySelector(".backToTop")) {
const backToTop = document.querySelector(
".backToTop"
);
window.addEventListener("scroll", () => {
const t = window.scrollY || window.pageYOffset;
t > 200 ? backToTop.classList.add("is-active") : backToTop.classList.remove("is-active");
});
backToTop.addEventListener("click", () => {
window.scrollTo({ top: 0, behavior: "smooth" });
});
}
}
initCopyright() {
const copyright = `<div class="site--footer__info">
Theme <a href="https://fatesinger.com/101971" target="_blank">farallon</a> by bigfa / version ${this.VERSION}
</div>`;
document.querySelector(".site--footer__content").insertAdjacentHTML("afterend", copyright);
document.querySelector(".icon--copryrights").addEventListener("click", () => {
document.querySelector(".site--footer__info").classList.toggle("active");
});
}
initThemeSwitch() {
const theme = localStorage.getItem("theme") ? localStorage.getItem("theme") : "auto";
const html = `<div class="fixed--theme">
<span class="${theme == "dark" ? "is-active" : ""}" data-action-value="dark">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
</svg>
</span>
<span class="${theme == "light" ? "is-active" : ""}" data-action-value="light">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<circle cx="12" cy="12" r="5"></circle>
<path d="M12 1v2"></path>
<path d="M12 21v2"></path>
<path d="M4.22 4.22l1.42 1.42"></path>
<path d="M18.36 18.36l1.42 1.42"></path>
<path d="M1 12h2"></path>
<path d="M21 12h2"></path>
<path d="M4.22 19.78l1.42-1.42"></path>
<path d="M18.36 5.64l1.42-1.42"></path>
</svg>
</span>
<span class="${theme == "auto" ? "is-active" : ""}" data-action-value="auto">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<path d="M8 21h8"></path>
<path d="M12 17v4"></path>
</svg>
</span>
</div>`;
document.querySelector("body").insertAdjacentHTML("beforeend", html);
document.querySelectorAll(".fixed--theme span").forEach((item) => {
item.addEventListener("click", () => {
if (item.classList.contains("is-active"))
return;
document.querySelectorAll(".fixed--theme span").forEach((item2) => {
item2.classList.remove("is-active");
});
if (item.dataset.actionValue == "dark") {
localStorage.setItem("theme", "dark");
document.querySelector("body").classList.remove("auto");
document.querySelector("body").classList.add("dark");
item.classList.add("is-active");
} else if (item.dataset.actionValue == "light") {
localStorage.setItem("theme", "light");
document.querySelector("body").classList.remove("auto");
document.querySelector("body").classList.remove("dark");
item.classList.add("is-active");
} else if (item.dataset.actionValue == "auto") {
localStorage.setItem("theme", "auto");
document.querySelector("body").classList.remove("dark");
document.querySelector("body").classList.add("auto");
item.classList.add("is-active");
}
});
});
}
};
new action_default({
singleSelector: ".post--single",
articleSelector: ".post--item",
likeButtonSelctor: ".like-btn",
// @ts-ignore
actionDomain: window.actionDomain
});
new farallonBase();
new date_default({
selector: ".humane--time",
//@ts-ignore
timeFormat: window.timeFormat
});
})();

629
dist/js/bundle1.js vendored
View File

@ -1,629 +0,0 @@
(() => {
// <stdin>
window.addComment = function(v) {
var I, C, h, E = v.document, b = { commentReplyClass: "comment-reply-link", commentReplyTitleId: "reply-title", cancelReplyId: "cancel-comment-reply-link", commentFormId: "commentform", temporaryFormId: "wp-temp-form-div", parentIdFieldId: "comment_parent", postIdFieldId: "comment_post_ID" }, e = v.MutationObserver || v.WebKitMutationObserver || v.MozMutationObserver, r = "querySelector" in E && "addEventListener" in v, n = !!E.documentElement.dataset;
function t() {
d(), e && new e(o).observe(E.body, { childList: true, subtree: true });
}
function d(e2) {
if (r && (I = g(b.cancelReplyId), C = g(b.commentFormId), I)) {
let t3 = function(e3) {
if ((e3.metaKey || e3.ctrlKey) && 13 === e3.keyCode)
return C.removeEventListener("keydown", t3), e3.preventDefault(), C.submit.click(), false;
};
var t2 = t3;
I.addEventListener("touchstart", l), I.addEventListener("click", l);
C && C.addEventListener("keydown", t3);
for (var n2, d2 = function(e3) {
var t4 = b.commentReplyClass;
e3 && e3.childNodes || (e3 = E);
e3 = E.getElementsByClassName ? e3.getElementsByClassName(t4) : e3.querySelectorAll("." + t4);
return e3;
}(e2), o2 = 0, i = d2.length; o2 < i; o2++)
(n2 = d2[o2]).addEventListener("touchstart", a), n2.addEventListener("click", a);
}
}
function l(e2) {
var t2, n2, d2 = g(b.temporaryFormId);
d2 && h && (g(b.parentIdFieldId).value = "0", t2 = d2.textContent, d2.parentNode.replaceChild(h, d2), this.style.display = "none", n2 = (d2 = (d2 = g(b.commentReplyTitleId)) && d2.firstChild) && d2.nextSibling, d2 && d2.nodeType === Node.TEXT_NODE && t2 && (n2 && "A" === n2.nodeName && n2.id !== b.cancelReplyId && (n2.style.display = ""), d2.textContent = t2), e2.preventDefault());
}
function a(e2) {
var t2 = g(b.commentReplyTitleId), t2 = t2 && t2.firstChild.textContent, n2 = this, d2 = m(n2, "belowelement"), o2 = m(n2, "commentid"), i = m(n2, "respondelement"), r2 = m(n2, "postid"), n2 = m(n2, "replyto") || t2;
d2 && o2 && i && r2 && false === v.addComment.moveForm(d2, o2, i, r2, n2) && e2.preventDefault();
}
function o(e2) {
for (var t2 = e2.length; t2--; )
if (e2[t2].addedNodes.length)
return void d();
}
function m(e2, t2) {
return n ? e2.dataset[t2] : e2.getAttribute("data-" + t2);
}
function g(e2) {
return E.getElementById(e2);
}
return r && "loading" !== E.readyState ? t() : r && v.addEventListener("DOMContentLoaded", t, false), { init: d, moveForm: function(e2, t2, n2, d2, o2) {
var i, r2, l2, a2, m2, c, s, e2 = g(e2), n2 = (h = g(n2), g(b.parentIdFieldId)), y = g(b.postIdFieldId), p = g(b.commentReplyTitleId), u = (p = p && p.firstChild) && p.nextSibling;
if (e2 && h && n2) {
void 0 === o2 && (o2 = p && p.textContent), a2 = h, m2 = b.temporaryFormId, c = g(m2), s = (s = g(b.commentReplyTitleId)) ? s.firstChild.textContent : "", c || ((c = E.createElement("div")).id = m2, c.style.display = "none", c.textContent = s, a2.parentNode.insertBefore(c, a2)), d2 && y && (y.value = d2), n2.value = t2, I.style.display = "", e2.parentNode.insertBefore(h, e2.nextSibling), p && p.nodeType === Node.TEXT_NODE && (u && "A" === u.nodeName && u.id !== b.cancelReplyId && (u.style.display = "none"), p.textContent = o2), I.onclick = function() {
return false;
};
try {
for (var f = 0; f < C.elements.length; f++)
if (i = C.elements[f], r2 = false, "getComputedStyle" in v ? l2 = v.getComputedStyle(i) : E.documentElement.currentStyle && (l2 = i.currentStyle), (i.offsetWidth <= 0 && i.offsetHeight <= 0 || "hidden" === l2.visibility) && (r2 = true), "hidden" !== i.type && !i.disabled && !r2) {
i.focus();
break;
}
} catch (e3) {
}
return false;
}
} };
}(window);
})();
/*! This file is auto-generated */
;
(() => {
// <stdin>
var FARALLON_DOUBAN = class {
ver;
type;
finished;
paged;
genre_list;
subjects;
genre;
baseAPI = "https://node.wpista.com/v1/outer/";
token;
constructor(config) {
this.ver = "1.0.1";
this.type = "movie";
this.finished = false;
this.paged = 1;
this.genre_list = [];
this.genre = [];
this.subjects = [];
this.token = config.token;
this._create();
}
on(t, e, n) {
var a = document.querySelectorAll(e);
a.forEach((item) => {
item.addEventListener(t, n);
});
}
_fetchGenres() {
document.querySelector(".db--genres").innerHTML = "";
fetch(
this.baseAPI + "genres?token=" + this.token + "&type=" + this.type
).then((response) => response.json()).then((t) => {
if (t.data.length) {
this.genre_list = t.data;
this._renderGenre();
}
});
}
_handleGenreClick() {
this.on("click", ".db--genreItem", (t) => {
const self = t.currentTarget;
if (self.classList.contains("is-active")) {
const index = this.genre.indexOf(self.innerText);
self.classList.remove("is-active");
this.genre.splice(index, 1);
this.paged = 1;
this.finished = false;
this.subjects = [];
this._fetchData();
return;
}
document.querySelector(".db--list").innerHTML = "";
document.querySelector(".lds-ripple").classList.remove("u-hide");
self.classList.add("is-active");
this.genre.push(self.innerText);
this.paged = 1;
this.finished = false;
this.subjects = [];
this._fetchData();
return;
});
}
_renderGenre() {
document.querySelector(".db--genres").innerHTML = this.genre_list.map((item) => {
return `<span class="db--genreItem${this.genre_list.includes(item.name) ? " is-active" : ""}">${item.name}</span>`;
}).join("");
this._handleGenreClick();
}
_fetchData() {
fetch(
this.baseAPI + "faves?token=" + this.token + "&type=" + this.type + "&paged=" + this.paged + "&genre=" + JSON.stringify(this.genre)
).then((response) => response.json()).then((t) => {
if (t.data.length) {
if (document.querySelector(".db--list").classList.contains("db--list__card")) {
this.subjects = [...this.subjects, ...t.data];
this._randerDateTemplate();
} else {
this.subjects = [...this.subjects, ...t.data];
this._randerListTemplate();
}
document.querySelector(".lds-ripple").classList.add("u-hide");
} else {
this.finished = true;
document.querySelector(".lds-ripple").classList.add("u-hide");
}
});
}
_randerDateTemplate() {
const result = this.subjects.reduce((result2, item) => {
const date = new Date(item.create_time);
const year = date.getFullYear();
const month = date.getMonth() + 1;
const key = `${year}-${month.toString().padStart(2, "0")}`;
if (Object.prototype.hasOwnProperty.call(result2, key)) {
result2[key].push(item);
} else {
result2[key] = [item];
}
return result2;
}, {});
let html = ``;
for (let key in result) {
const date = key.split("-");
html += `<div class="db--listBydate"><div class="db--titleDate "><div class="db--titleDate__day">${date[1]}</div><div class="db--titleDate__month">${date[0]}</div></div><div class="db--dateList__card">`;
html += result[key].map((movie) => {
return `<div class="db--item">${movie.is_top250 ? '<span class="top250">Top 250</span>' : ""}<img src="${movie.poster}" referrerpolicy="no-referrer" class="db--image"><div class="db--score ">${movie.douban_score > 0 ? '<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" ><path d="M12 20.1l5.82 3.682c1.066.675 2.37-.322 2.09-1.584l-1.543-6.926 5.146-4.667c.94-.85.435-2.465-.799-2.567l-6.773-.602L13.29.89a1.38 1.38 0 0 0-2.581 0l-2.65 6.53-6.774.602C.052 8.126-.453 9.74.486 10.59l5.147 4.666-1.542 6.926c-.28 1.262 1.023 2.26 2.09 1.585L12 20.099z"></path></svg>' + movie.douban_score : ""}${movie.year > 0 ? " \xB7 " + movie.year : ""}</div><div class="db--title"><a href="${movie.link}" target="_blank">${movie.name}</a></div></div>`;
}).join("");
html += `</div></div>`;
}
document.querySelector(".db--list").innerHTML = html;
}
_randerListTemplate() {
document.querySelector(".db--list").innerHTML = this.subjects.map((item) => {
return `<div class="db--item">${item.is_top250 ? '<span class="top250">Top 250</span>' : ""}<img src="${item.poster}" referrerpolicy="no-referrer" class="db--image"><div class="ipc-signpost ">${item.create_time}</div><div class="db--score ">${item.douban_score > 0 ? '<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" ><path d="M12 20.1l5.82 3.682c1.066.675 2.37-.322 2.09-1.584l-1.543-6.926 5.146-4.667c.94-.85.435-2.465-.799-2.567l-6.773-.602L13.29.89a1.38 1.38 0 0 0-2.581 0l-2.65 6.53-6.774.602C.052 8.126-.453 9.74.486 10.59l5.147 4.666-1.542 6.926c-.28 1.262 1.023 2.26 2.09 1.585L12 20.099z"></path></svg>' + item.douban_score : ""}${item.year > 0 ? " \xB7 " + item.year : ""}</div><div class="db--title"><a href="${item.link}" target="_blank">${item.name}</a></div>
</div>
</div>`;
}).join("");
}
_handleScroll() {
window.addEventListener("scroll", () => {
var t = window.scrollY || window.pageYOffset;
const moreElement = document.querySelector(
".block-more"
);
if (moreElement.offsetTop + -window.innerHeight < t && document.querySelector(".lds-ripple").classList.contains("u-hide") && !this.finished) {
document.querySelector(".lds-ripple").classList.remove("u-hide");
this.paged++;
this._fetchData();
}
});
}
_handleNavClick() {
this.on("click", ".db--navItem", (t) => {
if (t.currentTarget.classList.contains("current"))
return;
this.genre = [];
this.type = t.currentTarget.dataset.type;
if (this.type != "book") {
this._fetchGenres();
document.querySelector(".db--genres")?.classList.remove("u-hide");
} else {
document.querySelector(".db--genres").classList.add("u-hide");
}
document.querySelector(".db--list").innerHTML = "";
document.querySelector(".lds-ripple").classList.remove("u-hide");
document.querySelector(".db--navItem.current").classList.remove("current");
const self = t.target;
self.classList.add("current");
this.paged = 1;
this.finished = false;
this.subjects = [];
this._fetchData();
});
}
_create() {
if (document.querySelector(".db--container")) {
const container = document.querySelector(
".db--container"
);
if (container.dataset.token) {
this.token = container.dataset.token;
} else {
return;
}
const currentNavItem = document.querySelector(
".db--navItem.current"
);
if (currentNavItem instanceof HTMLElement) {
this.type = currentNavItem.dataset.type;
}
const currentType = document.querySelector(
".db--list"
);
if (currentType.dataset.type)
this.type = currentType.dataset.type;
if (this.type == "movie") {
document.querySelector(".db--genres").classList.remove("u-hide");
}
this._fetchGenres();
this._fetchData();
this._handleScroll();
this._handleNavClick();
}
if (document.querySelector(".js-db")) {
document.querySelectorAll(".js-db").forEach((item) => {
const db = item;
const id = db.dataset.id;
const type = db.dataset.type;
const nodeParent = db.parentNode;
fetch(
// @ts-ignore
this.baseAPI + `${type}/${id}?token=${this.token}`
).then((response) => {
response.json().then((t) => {
if (t.data) {
const data = t.data;
const node = document.createElement("div");
node.classList.add("doulist-item");
node.innerHTML = `<div class="doulist-subject">
<div class="doulist-post"><img decoding="async" referrerpolicy="no-referrer" src="${data.poster}"></div>
<div class="doulist-content">
<div class="doulist-title"><a href="${data.link}" class="cute" target="_blank" rel="external nofollow">${data.name}</a></div>
<div class="rating"><span class="allstardark"><span class="allstarlight" style="width:55%"></span></span><span class="rating_nums"> ${data.douban_score} </span></div>
<div class="abstract">${data.card_subtitle}</div>
</div>
</div>`;
nodeParent.replaceWith(node);
}
});
});
});
}
if (document.querySelector(".db--collection")) {
document.querySelectorAll(".db--collection").forEach((item) => {
this._fetchCollection(item);
});
}
}
_fetchCollection(item) {
const type = item.dataset.style ? item.dataset.style : "card";
fetch(
// @ts-ignore
obvInit.api + "v1/movies?type=" + item.dataset.type + "&paged=1&genre=&start_time=" + item.dataset.start + "&end_time=" + item.dataset.end
).then((response) => response.json()).then((t) => {
if (t.length) {
if (type == "card") {
item.innerHTML += t.map((movie) => {
return `<div class="doulist-item">
<div class="doulist-subject">
<div class="db--viewTime ">Marked ${movie.create_time}</div>
<div class="doulist-post"><img referrerpolicy="no-referrer" src="${movie.poster}"></div><div class="doulist-content"><div class="doulist-title"><a href="${movie.link}" class="cute" target="_blank" rel="external nofollow">${movie.name}</a></div><div class="rating"><span class="allstardark"><span class="allstarlight" style="width:75%"></span></span><span class="rating_nums">${movie.douban_score}</span></div><div class="abstract">${movie.remark || movie.card_subtitle}</div></div></div></div>`;
}).join("");
} else {
const result = t.reduce((result2, item2) => {
if (Object.prototype.hasOwnProperty.call(
result2,
item2.create_time
)) {
result2[item2.create_time].push(item2);
} else {
result2[item2.create_time] = [item2];
}
return result2;
}, {});
let html = ``;
for (let key in result) {
html += `<div class="db--date">${key}</div><div class="db--dateList">`;
html += result[key].map((movie) => {
return `<div class="db--card__list"">
<img referrerpolicy="no-referrer" src="${movie.poster}">
<div>
<div class="title"><a href="${movie.link}" class="cute" target="_blank" rel="external nofollow">${movie.name}</a></div>
<div class="rating"><span class="allstardark"><span class="allstarlight" style="width:75%"></span></span><span class="rating_nums">${movie.douban_score}</span></div>
${movie.remark || movie.card_subtitle}
</div>
</div>`;
}).join("");
html += `</div>`;
}
item.innerHTML = html;
}
}
});
}
};
new FARALLON_DOUBAN({
// @ts-ignore
token: window.WPD_TOKEN
});
})();
;
(() => {
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\utils.ts
var farallonHelper = class {
getCookie(t) {
if (0 < document.cookie.length) {
var e = document.cookie.indexOf(t + "=");
if (-1 != e) {
e = e + t.length + 1;
var n = document.cookie.indexOf(";", e);
return -1 == n && (n = document.cookie.length), document.cookie.substring(e, n);
}
}
return "";
}
setCookie(t, e, n) {
var o = /* @__PURE__ */ new Date();
o.setTime(o.getTime() + 24 * n * 60 * 60 * 1e3);
var i = "expires=" + o.toUTCString();
document.cookie = t + "=" + e + ";" + i + ";path=/";
}
showNotice(message, type = "success") {
const html = `<div class="notice--wrapper">${message}</div>`;
document.querySelector("body").insertAdjacentHTML("beforeend", html);
document.querySelector(".notice--wrapper").classList.add("is-active");
setTimeout(() => {
document.querySelector(".notice--wrapper").remove();
}, 3e3);
}
};
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\date.ts
var farallonDate = class {
selector;
timeFormat = {
second: "second ago",
seconds: "seconds ago",
minute: "minute ago",
minutes: "minutes ago",
hour: "hour ago",
hours: "hours ago",
day: "day ago",
days: "days ago",
week: "week ago",
weeks: "weeks ago",
month: "month ago",
months: "months ago",
year: "year ago",
years: "years ago"
};
doms = [];
constructor(config) {
this.selector = config.selector;
if (config.timeFormat) {
this.timeFormat = config.timeFormat;
}
this.init();
setTimeout(() => {
this.refresh();
}, 1e3 * 5);
}
init() {
this.doms = Array.from(document.querySelectorAll(this.selector));
this.doms.forEach((dom) => {
dom.innerText = this.humanize_time_ago(
dom.attributes["datetime"].value
);
});
}
humanize_time_ago(datetime) {
const time = new Date(datetime);
const between = Date.now() / 1e3 - Number(time.getTime() / 1e3);
if (between < 3600) {
return `${Math.ceil(between / 60)} ${Math.ceil(between / 60) == 1 ? this.timeFormat.second : this.timeFormat.seconds}`;
} else if (between < 86400) {
return `${Math.ceil(between / 3600)} ${Math.ceil(between / 3660) == 1 ? this.timeFormat.hour : this.timeFormat.hours}`;
} else if (between < 86400 * 30) {
return `${Math.ceil(between / 86400)} ${Math.ceil(between / 86400) == 1 ? this.timeFormat.day : this.timeFormat.days}`;
} else if (between < 86400 * 30 * 12) {
return `${Math.ceil(between / (86400 * 30))} ${Math.ceil(between / (86400 * 30)) == 1 ? this.timeFormat.month : this.timeFormat.months}`;
} else {
return time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
}
}
refresh() {
this.doms.forEach((dom) => {
dom.innerText = this.humanize_time_ago(
dom.attributes["datetime"].value
);
});
}
};
var date_default = farallonDate;
// ns-hugo:E:\OneDrive\桌面\suxiaoxiao\bigfa\bigfa.github.io\themes\farallon\assets\ts\action.ts
var farallonActions = class extends farallonHelper {
singleSelector = ".post--single";
likeButtonSelctor = ".like-btn";
articleSelector = ".post--item";
viewSelector = ".article--views";
actionDomain;
text = "";
likeButton = null;
post_id;
is_single = false;
constructor(config) {
super();
this.singleSelector = config.singleSelector ?? this.singleSelector;
this.likeButtonSelctor = config.likeButtonSelctor ?? this.likeButtonSelctor;
this.articleSelector = config.articleSelector ?? this.articleSelector;
this.viewSelector = config.viewSelector ?? this.viewSelector;
this.actionDomain = config.actionDomain;
this.text = config.text ?? this.text;
this.is_single = document.querySelector(this.singleSelector) ? true : false;
if (this.is_single) {
const postSingle = document.querySelector(
this.singleSelector
);
this.post_id = postSingle.dataset.id ?? "";
this.initArticleLike();
}
}
initArticleLike() {
this.likeButton = document.querySelector(this.likeButtonSelctor);
if (this.likeButton) {
fetch(this.actionDomain + "post/" + this.post_id + "/like").then(
(res) => {
res.json().then((data) => {
this.likeButton.querySelector(
".count"
).innerText = data.likes;
});
}
);
this.likeButton.addEventListener("click", () => {
this.handleLike();
});
if (this.getCookie("like_" + this.post_id)) {
this.likeButton.classList.add("is-active");
}
}
}
handleLike() {
if (this.getCookie("like_" + this.post_id)) {
return this.showNotice("You have already liked this post");
}
if (this.likeButton) {
const url = this.actionDomain + "post/" + this.post_id + "/like";
fetch(url, {
method: "post"
}).then((response) => {
return response.json();
}).then((data) => {
this.showNotice("Thanks for your like");
const countElement = this.likeButton?.querySelector(
".count"
);
if (countElement) {
countElement.innerText = data.likes;
}
this.setCookie("like_" + this.post_id, "1", 1);
});
this.likeButton?.classList.add("is-active");
}
}
};
var action_default = farallonActions;
// <stdin>
var farallonBase = class extends farallonHelper {
is_single = false;
post_id = 0;
is_archive = false;
VERSION = "0.4.1";
like_btn;
selctor = ".like-btn";
// @ts-ignore
actionDomain = window.actionDomain;
constructor() {
super();
this.initCopyright();
this.initThemeSwitch();
this.initBack2Top();
this.initSearch();
}
initSearch() {
document.querySelector('[data-action="show-search"]').addEventListener("click", () => {
document.querySelector(".site--header__center .inner").classList.toggle("search--active");
});
}
initBack2Top() {
if (document.querySelector(".backToTop")) {
const backToTop = document.querySelector(
".backToTop"
);
window.addEventListener("scroll", () => {
const t = window.scrollY || window.pageYOffset;
t > 200 ? backToTop.classList.add("is-active") : backToTop.classList.remove("is-active");
});
backToTop.addEventListener("click", () => {
window.scrollTo({ top: 0, behavior: "smooth" });
});
}
}
initCopyright() {
const copyright = `<div class="site--footer__info">
Theme <a href="https://fatesinger.com/101971" target="_blank">farallon</a> by bigfa / version ${this.VERSION}
</div>`;
document.querySelector(".site--footer__content").insertAdjacentHTML("afterend", copyright);
document.querySelector(".icon--copryrights").addEventListener("click", () => {
document.querySelector(".site--footer__info").classList.toggle("active");
});
}
initThemeSwitch() {
const theme = localStorage.getItem("theme") ? localStorage.getItem("theme") : "auto";
const html = `<div class="fixed--theme">
<span class="${theme == "dark" ? "is-active" : ""}" data-action-value="dark">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
</svg>
</span>
<span class="${theme == "light" ? "is-active" : ""}" data-action-value="light">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<circle cx="12" cy="12" r="5"></circle>
<path d="M12 1v2"></path>
<path d="M12 21v2"></path>
<path d="M4.22 4.22l1.42 1.42"></path>
<path d="M18.36 18.36l1.42 1.42"></path>
<path d="M1 12h2"></path>
<path d="M21 12h2"></path>
<path d="M4.22 19.78l1.42-1.42"></path>
<path d="M18.36 5.64l1.42-1.42"></path>
</svg>
</span>
<span class="${theme == "auto" ? "is-active" : ""}" data-action-value="auto">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"
style="color: currentcolor; width: 16px; height: 16px;">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<path d="M8 21h8"></path>
<path d="M12 17v4"></path>
</svg>
</span>
</div>`;
document.querySelector("body").insertAdjacentHTML("beforeend", html);
document.querySelectorAll(".fixed--theme span").forEach((item) => {
item.addEventListener("click", () => {
if (item.classList.contains("is-active"))
return;
document.querySelectorAll(".fixed--theme span").forEach((item2) => {
item2.classList.remove("is-active");
});
if (item.dataset.actionValue == "dark") {
localStorage.setItem("theme", "dark");
document.querySelector("body").classList.remove("auto");
document.querySelector("body").classList.add("dark");
item.classList.add("is-active");
} else if (item.dataset.actionValue == "light") {
localStorage.setItem("theme", "light");
document.querySelector("body").classList.remove("auto");
document.querySelector("body").classList.remove("dark");
item.classList.add("is-active");
} else if (item.dataset.actionValue == "auto") {
localStorage.setItem("theme", "auto");
document.querySelector("body").classList.remove("dark");
document.querySelector("body").classList.add("auto");
item.classList.add("is-active");
}
});
});
}
};
new action_default({
singleSelector: ".post--single",
articleSelector: ".post--item",
likeButtonSelctor: ".like-btn",
// @ts-ignore
actionDomain: window.actionDomain
});
new farallonBase();
new date_default({
selector: ".humane--time",
//@ts-ignore
timeFormat: window.timeFormat
});
})();

9
dist/js/prism.js vendored

File diff suppressed because one or more lines are too long

28
dist/js/prism1.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,22 +5,21 @@
<div class=site--footer__sns>
<?php $this->need('sns.php'); ?>
</div>
&copy; <?php echo date('Y'); ?> .
<a href="<?php $this->options->siteUrl(); ?>">
<?php $this->options->title(); ?>
</a>
. Made with 💗
<a target="_blank" href="https://blog.sgcd.net">
时光沉淀
</a>
<div class="copyright">©
</a>. |
Made with 💗
<div class="copyright">
版权所有 © <?php $this->options->jzyear() ?>-<?php echo date('Y'); ?>
<svg class="icon icon--copryrights" viewBox="0 0 1040 1024" width="16" height="16">
<path
d="M717.056236 383.936299l-51.226708 0c-28.2893 0-51.226708 22.936385-51.226708 51.225685l0 128.062678c0 28.2893 22.937408 51.225685 51.226708 51.225685l51.226708 0c28.2893 0 51.225685-22.936385 51.225685-51.225685L768.281921 435.161984C768.281921 406.872684 745.345536 383.936299 717.056236 383.936299zM717.056236 537.611308c0 14.158465-11.480472 25.612331-25.613354 25.612331-14.132882 0-25.612331-11.453866-25.612331-25.612331l0-76.835969c0-14.158465 11.480472-25.613354 25.612331-25.613354 14.133905 0 25.613354 11.453866 25.613354 25.613354L717.056236 537.611308zM1013.977739 426.580538 859.776751 165.30079c-8.888438-15.063067-22.294772-25.975605-37.57171-32.080649-32.708959-34.856879-79.187527-56.638975-130.762159-56.638975L332.862064 76.581166c-51.575656 0-98.0532 21.782096-130.761136 56.639998-15.276938 6.105045-28.683273 17.017582-37.572734 32.079626L10.327206 426.580538c-21.26021 36.069497-8.655124 82.217537 28.239158 103.028515l115.00836 64.967664 0 199.163015c0 99.024318 80.264045 153.678078 179.287339 153.678078l358.580818 0c99.024318 0 179.290409-80.266092 179.290409-179.290409L870.733291 594.575694l115.00836-64.966641C1022.63184 508.798075 1035.238972 462.650035 1013.977739 426.580538zM153.574724 536.518417l-67.058278-37.875632c-24.589025-13.907755-33.019021-44.647873-18.809391-68.684312l85.86767-145.555074L153.574724 536.518417zM646.620024 127.807874c0 56.5786-60.205197 102.45137-134.467551 102.45137-74.261331 0-134.466528-45.873794-134.466528-102.45137L646.620024 127.807874zM819.507606 742.515071c0 84.893482-68.810179 153.677055-153.678078 153.677055L358.475418 896.192126c-84.8679 0-153.675008-68.783573-153.675008-153.677055l0-461.030142c0-76.150354 55.402821-139.361001 128.093377-151.545508 1.332345 83.883479 81.06734 151.545508 179.258687 151.545508 98.19237 0 177.926342-67.662029 179.25971-151.545508 72.690556 12.183484 128.096447 75.394131 128.096447 151.545508L819.508629 742.515071zM937.791569 498.642784l-67.058278 37.875632 0-252.111948 85.86767 145.552004C970.807521 453.995935 962.377524 484.736053 937.791569 498.642784z"
p-id="4007"></path>
</svg>
</div>
</div>
<?php $this->options->tongji(); ?>
</footer>
@ -33,8 +32,8 @@
</svg>
</div>
</div>
<script src="<?php $this->options->themeUrl('/dist/js/bundle.js'); ?>"></script>
<?php $this->footer(); ?>
</div>
</body>
</html>

View File

@ -5,29 +5,36 @@ function themeConfig($form) {
$form->addInput($logoUrl);
$icoUrl = new Typecho_Widget_Helper_Form_Element_Text('icoUrl', NULL, NULL, _t('站点 Favicon 地址'));
$form->addInput($icoUrl);
$twikooENV = new Typecho_Widget_Helper_Form_Element_Text('twikooENV', NULL, NULL, _t('填入twikooENV'));
$form->addInput($twikooENV);
$instagramurl = new Typecho_Widget_Helper_Form_Element_Text('instagramurl', NULL, NULL, _t('填入INS地址'));
$jzyear = new Typecho_Widget_Helper_Form_Element_Text('jzyear', NULL, NULL, _t('建站年份'));
$form->addInput($jzyear);
$instagramurl = new Typecho_Widget_Helper_Form_Element_Text('instagramurl', NULL, NULL, _t('INS'));
$form->addInput($instagramurl);
$telegramurl = new Typecho_Widget_Helper_Form_Element_Text('telegramurl', NULL, NULL, _t('填入电报地址'));
$telegramurl = new Typecho_Widget_Helper_Form_Element_Text('telegramurl', NULL, NULL, _t('电报'));
$form->addInput($telegramurl);
$githuburl = new Typecho_Widget_Helper_Form_Element_Text('githuburl', NULL, NULL, _t('填入github地址'));
$githuburl = new Typecho_Widget_Helper_Form_Element_Text('githuburl', NULL, NULL, _t('github'));
$form->addInput($githuburl);
$twitterurl = new Typecho_Widget_Helper_Form_Element_Text('twitterurl', NULL, NULL, _t('填入twitter地址'));
$twitterurl = new Typecho_Widget_Helper_Form_Element_Text('twitterurl', NULL, NULL, _t('twitter'));
$form->addInput($twitterurl);
$feedurl = new Typecho_Widget_Helper_Form_Element_Text('feedurl', NULL, NULL, _t('填入网站Feed地址'));
$feedurl = new Typecho_Widget_Helper_Form_Element_Text('feedurl', NULL, NULL, _t('网站Feed'));
$form->addInput($feedurl);
$mastodonurl = new Typecho_Widget_Helper_Form_Element_Text('mastodonurl', NULL, NULL, _t('填入mastodon地址'));
$mastodonurl = new Typecho_Widget_Helper_Form_Element_Text('mastodonurl', NULL, NULL, _t('mastodon'));
$form->addInput($mastodonurl);
$twikoo = new Typecho_Widget_Helper_Form_Element_Textarea('twikoo', NULL, NULL, _t('引用第三方评论'));
$form->addInput($twikoo);
$addhead = new Typecho_Widget_Helper_Form_Element_Textarea('addhead', NULL, NULL, _t('添加head引用'));
$addhead = new Typecho_Widget_Helper_Form_Element_Textarea('addhead', NULL, NULL, _t('添加head'));
$form->addInput($addhead);
$tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, NULL, _t('统计代码'));
$form->addInput($tongji);
}
function themeFields($layout) {
$switchpf = new Typecho_Widget_Helper_Form_Element_Checkbox('switchpf',
array('open'=>'显示作者'),
NULL,
_t('是否文章页面显示作者信息'),
_t('勾选后,将在文章页面显示'));
$layout->addItem($switchpf);
}
function get_post_view($archive) {
$cid = $archive->cid;
$db = Typecho_Db::get();

View File

@ -15,27 +15,40 @@ error_reporting(E_ALL);if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
'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() ?></title>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/style.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('/dist/css/style.css'); ?>">
<?php if ($this->options->icoUrl): ?>
<link rel='icon' href='<?php $this->options->icoUrl() ?>' type='image/x-icon' />
<?php endif; ?>
<?php $this->header("generator=&template=&pingback=&wlw=&xmlrpc=&rss1=&atom=&rss2=/feed"); ?>
<script src="https://www.sunpeiwen.com/ts/bundle.js"></script>
<?php $this->options->addhead(); ?>
<?php $this->options->addhead(); ?>
</head>
<body>
<script>
window.DEFAULT_THEME = "light";
if (localStorage.getItem("theme") == null) {
localStorage.setItem("theme", window.DEFAULT_THEME);
}
if (localStorage.getItem("theme") == "dark") {
document.querySelector("body").classList.add("dark");
}
if (localStorage.getItem("theme") == "auto") {
document.querySelector("body").classList.add("auto");
}
</script>
<div class="main">
<header class="site--header">
<?php if ($this->options->logoUrl): ?>
<a href="<?php $this->options->siteUrl(); ?>" class="site--url">
<img src="<?php $this->options->icoUrl() ?>" class="avatar" alt="<?php $this->options->title() ?>" />
</a>
</a>
<?php else: ?>
<span class="u-xs-show">
<a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
</span>
<?php endif; ?>
<div class="site--header__center">
<div class="site--header__center">
<div class="inner">
<nav>
<ul>
@ -48,19 +61,23 @@ error_reporting(E_ALL);if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
</ul>
</nav>
<div class="search--area">
<!-- 这年头谁会用站内的搜索啊 -->
<div class="search--area">
<form id="search" method="post" action="./" role="search" class="search-form">
<label>
<input type="text" name="s" class="search-field" placeholder="<?php _e('Search'); ?>" required/>
<input type="text" name="s" class="search-field text" placeholder="Search" required/>
</label>
<button type="submit" class="search-submit"><?php _e('搜索'); ?></button>
</form>
</div>
<button type="submit" class="search-submit submit">搜索</button>
</form>
</div>
<svg class="svgIcon" width="25" height="25" data-action="show-search">
</div>
</div>
<!-- 留下这个好看的搜索标,实际没有什么卵用-->
<svg class="svgIcon" width="25" height="25" data-action="show-search">
<path
d="M20.067 18.933l-4.157-4.157a6 6 0 1 0-.884.884l4.157 4.157a.624.624 0 1 0 .884-.884zM6.5 11c0-2.62 2.13-4.75 4.75-4.75S16 8.38 16 11s-2.13 4.75-4.75 4.75S6.5 13.62 6.5 11z">
</path>
</svg></div>
</svg>
</header>

View File

@ -1,9 +1,9 @@
<?php
/**
* @package zizhi
* @author zizhi
* @version 1.0
* @link https://minirizhi.com
* @package farallon
* @author 原作者 bigfa 老孙移植
* @version 0.4.1
* @link https://imsun.org
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');

21
page-about.php Normal file
View File

@ -0,0 +1,21 @@
<?php
/**
* 关于页面
*
* @package custom
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main class="site--main">
<header class="archive--header">
<h1 class="post--single__title"><?php $this->title() ?></h1>
</header>
<article class="post--single">
<div class="graph u-marginBottom30">
<?php $this->content(); ?>
</div>
</article>
</main>
<?php $this->need('footer.php'); ?>

View File

@ -1,16 +1,15 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main class="site--main">
<section class="site--main">
<header class="archive--header">
<h1 class="post--single__title"><?php $this->title() ?></h1>
</header>
<article class="post--single">
<div class="graph u-marginBottom30">
<?php $this->content(); ?>
</div>
</article>
<?php $this->need('comments.php'); ?>
</main>
<?php $this->need('comments.php'); ?>
</section>
<?php $this->need('footer.php'); ?>

View File

@ -38,25 +38,32 @@
</div>
<div class="post--single__action">
<button class="button--like like-btn" aria-label="like the post">
<svg class="icon--active" viewBox="0 0 1024 1024" width="32" height="32">
<path
d="M780.8 204.8c-83.2-44.8-179.2-19.2-243.2 44.8L512 275.2 486.4 249.6c-64-64-166.4-83.2-243.2-44.8C108.8 275.2 89.6 441.6 185.6 537.6l32 32 153.6 153.6 102.4 102.4c25.6 25.6 57.6 25.6 83.2 0l102.4-102.4 153.6-153.6 32-32C934.4 441.6 915.2 275.2 780.8 204.8z">
</path>
</svg>
<svg class="icon--default" viewBox="0 0 1024 1024" width="32" height="32">
<path
d="M332.8 249.6c38.4 0 83.2 19.2 108.8 44.8L467.2 320 512 364.8 556.8 320l25.6-25.6c32-32 70.4-44.8 108.8-44.8 19.2 0 38.4 6.4 57.6 12.8 44.8 25.6 70.4 57.6 76.8 108.8 6.4 44.8-6.4 89.6-38.4 121.6L512 774.4 236.8 492.8C204.8 460.8 185.6 416 192 371.2c6.4-44.8 38.4-83.2 76.8-108.8C288 256 313.6 249.6 332.8 249.6L332.8 249.6M332.8 185.6C300.8 185.6 268.8 192 243.2 204.8 108.8 275.2 89.6 441.6 185.6 537.6l281.6 281.6C480 832 499.2 838.4 512 838.4s32-6.4 38.4-19.2l281.6-281.6c96-96 76.8-262.4-57.6-332.8-25.6-12.8-57.6-19.2-89.6-19.2-57.6 0-115.2 25.6-153.6 64L512 275.2 486.4 249.6C448 211.2 390.4 185.6 332.8 185.6L332.8 185.6z">
</path>
</svg>
<span class="count"></span>
</button>
</div>
<!--打赏 -->
<script type="text/javascript" src="https://blogcdn.loliko.cn/donate/index_wx.js?121"></script>
<link rel="stylesheet" type="text/css" href="https://blogcdn.loliko.cn/donate/style_wx.css?121" />
<div class="donate-panel">
<div id="donate-btn"></div>
<div id="qrcode-panel" style="display: none;">
<div class="qrcode-body">
<div class="donate-memo">
<span id="donate-close">关闭</span>
</div>
<div class="donate-qrpay">
<img id="wxqr" src="https://blogcdn.loliko.cn/donate/wx.png" />
</div>
</div>
</div>
</div>
</div>
<!-- TAG -->
<div class="tag--list artile--tag">
<?php $this->tags(' ', true, ' '); ?>
</div>
<!-- 个人信息-->
<?php if($this->fields->switchpf && in_array('open', $this->fields->switchpf)): ?>
<?php $this->need('profile.php'); ?>
<?php endif; ?>
<!--翻页-->
<nav class="navigation post-navigation is-active">
<div class="nav-links">
@ -71,9 +78,8 @@
</nav>
</ul>
</article>
<div class="comments">
<?php $this->need('comments.php'); ?>
</div>
</main>
<?php $this->need('footer.php'); ?>

View File

@ -57,10 +57,23 @@
</article>
<?php endwhile; ?>
<div class="nav-links">
<?php $this->pageLink('加载更多','next'); ?>
</div>
<?php
$this->pagenav(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" fill="var(--main)"></path></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.1714 12.0007L8.22168 7.05093L9.63589 5.63672L15.9999 12.0007L9.63589 18.3646L8.22168 16.9504L13.1714 12.0007Z" fill="var(--main)"></path></svg>',
1,
'...',
array(
'wrapTag' => 'div',
'wrapClass' => 'cat_pagination_page',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
)
);
?>

21
sns.php
View File

@ -1,5 +1,5 @@
<a href="<?php $this->options->feedurl() ?>" target="_blank">
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<a href="/feed" target="_blank">
<svg class="sns" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 17C12 14 10 12 7 12" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round" />
<path d="M17 17C17 11 13 7 7 7" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round" />
@ -9,28 +9,31 @@
stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
<?php if($this->options->telegramurl): ?>
<a href="<?php $this->options->telegramurl() ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path
d="M 25.154297 3.984375 C 24.829241 3.998716 24.526384 4.0933979 24.259766 4.2011719 C 24.010014 4.3016357 23.055766 4.7109106 21.552734 5.3554688 C 20.048394 6.0005882 18.056479 6.855779 15.931641 7.7695312 C 11.681964 9.5970359 6.9042108 11.654169 4.4570312 12.707031 C 4.3650097 12.746607 4.0439208 12.849183 3.703125 13.115234 C 3.3623292 13.381286 3 13.932585 3 14.546875 C 3 15.042215 3.2360676 15.534319 3.5332031 15.828125 C 3.8303386 16.121931 4.144747 16.267067 4.4140625 16.376953 C 5.3912284 16.775666 8.4218473 18.015862 8.9941406 18.25 C 9.195546 18.866983 10.29249 22.222526 10.546875 23.044922 C 10.714568 23.587626 10.874198 23.927519 11.082031 24.197266 C 11.185948 24.332139 11.306743 24.45034 11.453125 24.542969 C 11.511635 24.579989 11.575789 24.608506 11.640625 24.634766 L 11.644531 24.636719 C 11.659471 24.642719 11.67235 24.652903 11.6875 24.658203 C 11.716082 24.668202 11.735202 24.669403 11.773438 24.677734 C 11.925762 24.726927 12.079549 24.757812 12.216797 24.757812 C 12.80196 24.757814 13.160156 24.435547 13.160156 24.435547 L 13.181641 24.419922 L 16.191406 21.816406 L 19.841797 25.269531 C 19.893193 25.342209 20.372542 26 21.429688 26 C 22.057386 26 22.555319 25.685026 22.875 25.349609 C 23.194681 25.014192 23.393848 24.661807 23.478516 24.21875 L 23.478516 24.216797 C 23.557706 23.798129 26.921875 6.5273437 26.921875 6.5273438 L 26.916016 6.5507812 C 27.014496 6.1012683 27.040303 5.6826405 26.931641 5.2695312 C 26.822973 4.8564222 26.536648 4.4608905 26.181641 4.2480469 C 25.826669 4.0352506 25.479353 3.9700339 25.154297 3.984375 z M 24.966797 6.0742188 C 24.961997 6.1034038 24.970391 6.0887279 24.962891 6.1230469 L 24.960938 6.1347656 L 24.958984 6.1464844 C 24.958984 6.1464844 21.636486 23.196371 21.513672 23.845703 C 21.522658 23.796665 21.481573 23.894167 21.439453 23.953125 C 21.379901 23.91208 21.257812 23.859375 21.257812 23.859375 L 21.238281 23.837891 L 16.251953 19.121094 L 12.726562 22.167969 L 13.775391 17.96875 C 13.775391 17.96875 20.331562 11.182109 20.726562 10.787109 C 21.044563 10.471109 21.111328 10.360953 21.111328 10.251953 C 21.111328 10.105953 21.035234 10 20.865234 10 C 20.712234 10 20.506484 10.14875 20.396484 10.21875 C 18.963383 11.132295 12.671823 14.799141 9.8515625 16.439453 C 9.4033769 16.256034 6.2896636 14.981472 5.234375 14.550781 C 5.242365 14.547281 5.2397349 14.548522 5.2480469 14.544922 C 7.6958673 13.491784 12.47163 11.434667 16.720703 9.6074219 C 18.84524 8.6937992 20.838669 7.8379587 22.341797 7.1933594 C 23.821781 6.5586849 24.850125 6.1218894 24.966797 6.0742188 z" />
</svg>
</a>
<?php endif; ?>
<?php if($this->options->twitterurl): ?>
<a href="<?php $this->options->twitterurl() ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path
d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" />
</svg>
</a>
<?php endif; ?>
<?php if($this->options->instagramurl): ?>
<a href="<?php $this->options->instagramurl() ?>" target="_blank">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M10.825091,2 L13.1738932,2 C14.8491598,2.00379146 15.2338099,2.01854561 16.1226982,2.059103 C17.187141,2.10765278 17.9141174,2.27672349 18.5502266,2.52395815 C19.2078518,2.77948955 19.7655588,3.12144192 20.3215589,3.67740233 C20.8775194,4.23340244 21.2194717,4.79110953 21.4750428,5.44873467 C21.7222377,6.08484389 21.8913085,6.81182019 21.9398582,7.87626307 C21.9869049,8.90737346 21.9992305,9.25998097 22,11.7357029 L22,12.2632942 C21.9992305,14.7389803 21.9869049,15.0915878 21.9398582,16.1226982 C21.8913085,17.187141 21.7222377,17.9141174 21.4750428,18.5502266 C21.2194717,19.2078518 20.8775194,19.7655588 20.3215589,20.3215589 C19.7655588,20.8775194 19.2078518,21.2194717 18.5502266,21.4750428 C17.9141174,21.7222377 17.187141,21.8913085 16.1226982,21.9398582 C15.0915878,21.9869049 14.7389803,21.9992305 12.2632942,22 L11.7357029,22 C9.25998097,21.9992305 8.90737346,21.9869049 7.87626307,21.9398582 C6.81182019,21.8913085 6.08484389,21.7222377 5.44873467,21.4750428 C4.79110953,21.2194717 4.23340244,20.8775194 3.67740233,20.3215589 C3.12144192,19.7655588 2.77948955,19.2078518 2.52395815,18.5502266 C2.27672349,17.9141174 2.10765278,17.187141 2.059103,16.1226982 C2.01854561,15.2338099 2.00379146,14.8491598 2,13.1738932 L2,10.825091 C2.00379146,9.14980144 2.01854561,8.76515134 2.059103,7.87626307 C2.10765278,6.81182019 2.27672349,6.08484389 2.52395815,5.44873467 C2.77948955,4.79110953 3.12144192,4.23340244 3.67740233,3.67740233 C4.23340244,3.12144192 4.79110953,2.77948955 5.44873467,2.52395815 C6.08484389,2.27672349 6.81182019,2.10765278 7.87626307,2.059103 C8.76515134,2.01854561 9.14980144,2.00379146 10.825091,2 L13.1738932,2 L10.825091,2 Z M12.733046,3.80115495 L11.2659442,3.80115495 C9.25857953,3.80324073 8.90746344,3.81583469 7.95839674,3.85913648 C6.98335214,3.90359743 6.45383012,4.06651507 6.10143736,4.20347069 C5.63463704,4.38488726 5.30149746,4.60159471 4.95156594,4.95156594 C4.60159471,5.30149746 4.38488726,5.63463704 4.20347069,6.10143736 C4.06651507,6.45383012 3.90359743,6.98335214 3.85913648,7.95839674 C3.81583469,8.90746344 3.80324073,9.25857953 3.80115495,11.2659442 L3.80115495,12.733046 C3.80324073,14.7403818 3.81583469,15.0914978 3.85913648,16.0405646 C3.90359743,17.0156091 4.06651507,17.5451311 4.20347069,17.8975239 C4.38488726,18.3643242 4.60163441,18.6974638 4.95156594,19.0473953 C5.30149746,19.3973665 5.63463704,19.614074 6.10143736,19.7954906 C6.45383012,19.9324462 6.98335214,20.0953638 7.95839674,20.1398247 C9.0127962,20.1879378 9.32902474,20.1981401 11.9995005,20.1981401 C14.6699365,20.1981401 14.9862047,20.1879378 16.0405646,20.1398247 C17.0156091,20.0953638 17.5451311,19.9324462 17.8975239,19.7954906 C18.3643242,19.614074 18.6974638,19.3973665 19.0473953,19.0473953 C19.3973665,18.6974638 19.614074,18.3643242 19.7954906,17.8975239 C19.9324462,17.5451311 20.0953638,17.0156091 20.1398247,16.0405646 C20.1879378,14.986046 20.1981401,14.6697381 20.1981401,11.9995005 C20.1981401,9.32922322 20.1879378,9.0129153 20.1398247,7.95839674 C20.0953638,6.98335214 19.9324462,6.45383012 19.7954906,6.10143736 C19.614074,5.63463704 19.3973665,5.30149746 19.0473953,4.95156594 C18.6974638,4.60159471 18.3643242,4.38488726 17.8975239,4.20347069 C17.5451311,4.06651507 17.0156091,3.90359743 16.0405646,3.85913648 C15.0914978,3.81583469 14.7403818,3.80324073 12.733046,3.80115495 Z M11.9995,6.99920128 C14.7610764,6.99920128 16.99976,9.23788484 16.99976,11.9995 C16.99976,14.7610764 14.7610764,16.99976 11.9995,16.99976 C9.23788484,16.99976 6.99920128,14.7610764 6.99920128,11.9995 C6.99920128,9.23788484 9.23788484,6.99920128 11.9995,6.99920128 Z M11.9995,8.75368323 C10.2068679,8.75368323 8.75368323,10.2068679 8.75368323,11.9995 C8.75368323,13.7920934 10.2068679,15.245278 11.9995,15.245278 C13.7920934,15.245278 15.245278,13.7920934 15.245278,11.9995 C15.245278,10.2068679 13.7920934,8.75368323 11.9995,8.75368323 Z M17.4164293,5.33244149 C18.1068302,5.33244149 18.6665198,5.89213105 18.6665198,6.58253201 C18.6665198,7.27293296 18.1068302,7.83258117 17.4164293,7.83258117 C16.7260697,7.83258117 16.1663801,7.27293296 16.1663801,6.58253201 C16.1663801,5.89213105 16.7260697,5.33244149 17.4164293,5.33244149 Z" />
</svg>
</a>
<?php endif; ?>
<?php if($this->options->githuburl): ?>
<a href="<?php $this->options->githuburl() ?>" target="_blank">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
@ -38,9 +41,11 @@
fill="#000000" />
</svg>
</a>
<?php endif; ?>
<?php if($this->options->mastodonurl): ?>
<a href="<?php $this->options->mastodonurl() ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path d="M433 179.1c0-97.2-63.7-125.7-63.7-125.7-62.5-28.7-228.6-28.4-290.5 0 0 0-63.7 28.5-63.7 125.7 0 115.7-6.6 259.4 105.6 289.1 40.5 10.7 75.3 13 103.3 11.4 50.8-2.8 79.3-18.1 79.3-18.1l-1.7-36.9s-36.3 11.4-77.1 10.1c-40.4-1.4-83-4.4-89.6-54a102.5 102.5 0 0 1 -.9-13.9c85.6 20.9 158.7 9.1 178.8 6.7 56.1-6.7 105-41.3 111.2-72.9 9.8-49.8 9-121.5 9-121.5zm-75.1 125.2h-46.6v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.3V197c0-58.5-64-56.6-64-6.9v114.2H90.2c0-122.1-5.2-147.9 18.4-175 25.9-28.9 79.8-30.8 103.8 6.1l11.6 19.5 11.6-19.5c24.1-37.1 78.1-34.8 103.8-6.1 23.7 27.3 18.4 53 18.4 175z"/>
</svg>
</a>
</a>
<?php endif; ?>