mirror of
https://github.com/jkjoy/typecho-theme-farallon.git
synced 2026-06-28 02:34:26 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ac5a088aa | |||
| bfc8076867 | |||
| cd8738f10e | |||
| b7250fde19 | |||
| 579f92c720 | |||
| 458fad51bb | |||
| f1b8c138ac | |||
| 0289493b1d | |||
| b98790a646 | |||
| dbe59a80de | |||
| 5edbf772c7 | |||
| 0f64cc9bba |
+19
-20
@@ -1,7 +1,8 @@
|
||||
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<div class="post--ingle__comments">
|
||||
<?php $this->comments()->to($comments); ?>
|
||||
<?php if($this->allow('comment') && stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh') > -1): ?>
|
||||
<?php $language = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '';
|
||||
if($this->allow('comment') && stripos($language, 'zh') > -1): ?>
|
||||
<?php if ($this->is('attachment')) : ?>
|
||||
<?php else: ?>
|
||||
<h3 class="comments--title" id="comments">
|
||||
@@ -49,8 +50,7 @@
|
||||
<?php if ($comments->have()): ?>
|
||||
<?php $comments->listComments(); ?>
|
||||
|
||||
<?php
|
||||
$comments->pageNav(
|
||||
<?php $comments->pageNav(
|
||||
' ',
|
||||
' ',
|
||||
1,
|
||||
@@ -92,31 +92,31 @@ function threadedComments($comments, $options) {
|
||||
}
|
||||
echo $commentClass;
|
||||
?>">
|
||||
<?php $commentApprove = commentApprove($comments, $comments->mail); ?>
|
||||
<div class="comment-body" id="<?php $comments->theId(); ?>">
|
||||
<div class="comment-meta">
|
||||
<div class="comment--avatar">
|
||||
<?php if ($comments->url): ?>
|
||||
<a href="<?php echo $comments->url ?>" target="_blank" rel="external nofollow"><?php echo $comments->gravatar('40', ''); ?> </a>
|
||||
<?php if ($comments->url): ?>
|
||||
<a href="<?php echo $comments->url ?>" target="_blank" rel="external nofollow" title=" <?php echo $commentApprove['userDesc']; ?> ">
|
||||
<?php echo $comments->gravatar('40', ''); ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php echo $comments->gravatar('40', ''); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="comment--meta">
|
||||
<div class="comment--author"><?php echo $comments->author; ?>
|
||||
<div class="comment--author">
|
||||
<span style="color: <?php echo $commentApprove['bgColor']; ?>;">
|
||||
<p class="tooltip" data-tooltip=" <?php echo $commentApprove['userLevel']; ?> ">
|
||||
<?php echo $comments->author; ?>
|
||||
</p>
|
||||
</span>
|
||||
<span class="dot"></span>
|
||||
<?php $commentApprove = commentApprove($comments, $comments->mail); ?>
|
||||
<span style="color: <?php echo $commentApprove['bgColor']; ?>;">
|
||||
<?php echo $commentApprove['userLevel']; ?>
|
||||
</span>
|
||||
<span class="dot"></span>
|
||||
<div class="comment--time"><?php $comments->date('Y-m-d H:i'); ?></div>
|
||||
<span class="dot"></span>
|
||||
<!-- <span class="dot"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12" fill="currentColor"><path d="M12 20.8995L16.9497 15.9497C19.6834 13.2161 19.6834 8.78392 16.9497 6.05025C14.2161 3.31658 9.78392 3.31658 7.05025 6.05025C4.31658 8.78392 4.31658 13.2161 7.05025 15.9497L12 20.8995ZM12 23.7279L5.63604 17.364C2.12132 13.8492 2.12132 8.15076 5.63604 4.63604C9.15076 1.12132 14.8492 1.12132 18.364 4.63604C21.8787 8.15076 21.8787 13.8492 18.364 17.364L12 23.7279ZM12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13ZM12 15C9.79086 15 8 13.2091 8 11C8 8.79086 9.79086 7 12 7C14.2091 7 16 8.79086 16 11C16 13.2091 14.2091 15 12 15Z"></path></svg>
|
||||
<?php
|
||||
$ip = $comments->ip; // Ensure this is the correct property for IP
|
||||
$location = get_ip_location($ip);
|
||||
echo htmlspecialchars($location['country']);
|
||||
?>
|
||||
-->
|
||||
<?php //$ip = $comments->ip; $location = get_ip_location($ip); display_location($location); ?>
|
||||
<span class="comment-reply-link u-cursorPointer">
|
||||
<?php $comments->reply('<svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" class="" ><g><path d="M12 3.786c-4.556 0-8.25 3.694-8.25 8.25s3.694 8.25 8.25 8.25c1.595 0 3.081-.451 4.341-1.233l1.054 1.7c-1.568.972-3.418 1.534-5.395 1.534-5.661 0-10.25-4.589-10.25-10.25S6.339 1.786 12 1.786s10.25 4.589 10.25 10.25c0 .901-.21 1.77-.452 2.477-.592 1.731-2.343 2.477-3.917 2.334-1.242-.113-2.307-.74-3.013-1.647-.961 1.253-2.45 2.011-4.092 1.78-2.581-.363-4.127-2.971-3.76-5.578.366-2.606 2.571-4.688 5.152-4.325 1.019.143 1.877.637 2.519 1.342l1.803.258-.507 3.549c-.187 1.31.761 2.509 2.079 2.629.915.083 1.627-.356 1.843-.99.2-.585.345-1.224.345-1.83 0-4.556-3.694-8.25-8.25-8.25zm-.111 5.274c-1.247-.175-2.645.854-2.893 2.623-.249 1.769.811 3.143 2.058 3.319 1.247.175 2.645-.854 2.893-2.623.249-1.769-.811-3.144-2.058-3.319z"></path></g></svg>'); ?>
|
||||
</span>
|
||||
@@ -124,8 +124,7 @@ function threadedComments($comments, $options) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<?php if ($comments->parent) {echo getPermalinkFromCoid($comments->parent);}?>
|
||||
<?php $comments->content(); ?>
|
||||
<?php if ($comments->parent) {echo getPermalinkFromCoid($comments->parent);} $comments->content();?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($comments->children) { ?>
|
||||
@@ -134,4 +133,4 @@ function threadedComments($comments, $options) {
|
||||
</ol>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
$movie_id = $_GET['id'];
|
||||
$api_url = "https://api.loliko.cn/movies/{$movie_id}";
|
||||
|
||||
$context = stream_context_create([
|
||||
'http' => [
|
||||
'ignore_errors' => true,
|
||||
'timeout' => 10 // 设置10秒超时
|
||||
]
|
||||
]);
|
||||
|
||||
$response = file_get_contents($api_url, false, $context);
|
||||
|
||||
if ($response === FALSE) {
|
||||
header("HTTP/1.1 500 Internal Server Error");
|
||||
echo json_encode(['error' => 'Failed to fetch data from API']);
|
||||
} else {
|
||||
$responseData = json_decode($response, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
header('Content-Type: application/json');
|
||||
echo $response;
|
||||
} else {
|
||||
header("HTTP/1.1 500 Internal Server Error");
|
||||
echo json_encode(['error' => 'Invalid JSON response from API']);
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.neodb-container{--db-item-width:150px;--db-item-height:180px;--db-music-width:150px;--db-music-height:150px;--db-primary-color:var(--farallon-hover-color);--db-background-white:var(--farallon-background-white);--db-background-gray:var(--farallon-background-gray);--db-border-color:var(--farallon-border-color);--db-text-light:var(--farallon-text-light);}.neodb-nav{padding:30px 0 20px;display:flex;align-items:center;flex-wrap:wrap;}.neodb-navItem{font-size:20px;cursor:pointer;border-bottom:1px solid rgba(0,0,0,0);transition:0.5s border-color;display:flex;align-items:center;text-transform:capitalize;}.neodb-navItem.current,.neodb-navItem:hover{border-color:inherit;}.neodb-navItem{margin-right:20px;}.neodb-score svg{fill:#f5c518;margin-right:5px;}.neodb-list{display:flex;align-items:flex-start;flex-wrap:wrap;}.neodb-image{width:var(--db-item-width);height:var(--db-item-height);object-fit:cover;border-radius:4px;}.neodb-image:hover{box-shadow:0 0 10px var(--db-border-color);}.neodb-title{margin-top:2px;font-size:14px;line-height:1.4;}.neodb-title a:hover{color:var(--db-primary-color);text-decoration:underline;}.neodb-genreItem{background:var(--db-background-gray);font-size:12px;padding:5px 12px;border-radius:4px;margin-right:6px;margin-bottom:10px;line-height:1.4;cursor:pointer;}.neodb-genreItem.is-active,.neodb-genreItem:hover{background-color:var(--db-primary-color);color:var(--db-background-white);}.neodb-genres{padding-bottom:15px;display:flex;flex-wrap:wrap;}.neodb-genres.u-hide + .neodb-list{padding-top:10px;}.neodb-score{display:flex;align-items:center;font-size:14px;color:var(--db-text-light);}.neodb-item{width:var(--db-item-width);margin-right:20px;margin-bottom:20px;position:relative;}.neodb-item__music img{width:var(--db-music-width);height:var(--db-music-height);object-fit:cover;}.neodb-date{position:relative;font-size:20px;color:var(--farallon-text-light);font-weight:900;line-height:1;}.neodb-date::before{content:"";position:absolute;top:0.5em;bottom:-2px;left:-10px;width:3.4em;z-index:-1;background:var(--farallon-hover-color);opacity:0.3;transform:skew(-35deg);transition:opacity 0.2s ease;border-radius:3px 8px 10px 6px;}.neodb-date{margin-top:30px;margin-bottom:10px;}.neodb-dateList{padding-left:15px;padding-top:5px;padding-right:15px;}.neodb-card__list{display:flex;align-items:center;padding:15px 0;border-bottom:1px dotted var(--farallon-border-color);font-size:14px;color:rgba(0,0,0,0.55);}.neodb-card__list:last-child{border-bottom:0;}.neodb-card__list .title{font-size:18px;margin-bottom:5px;}.neodb-card__list .rating{margin:0 0 0px;font-size:14px;line-height:1;display:flex;align-items:center;}.neodb-card__list .rating .allstardark{position:relative;color:#f99b01;height:16px;width:80px;background-repeat:repeat;background-image:url("../images/star.svg");background-size:auto 100%;margin-right:5px;}.neodb-card__list .rating .allstarlight{position:absolute;left:0;color:#f99b01;height:16px;overflow:hidden;background-repeat:repeat;background-image:url("../images/star-fill.svg");background-size:auto 100%;}.neodb-card__list img{width:80px;border-radius:4px;height:80px;object-fit:cover;flex:0 0 auto;margin-right:15px;}.neodb-titleDate{display:flex;flex-direction:column;line-height:1.1;margin-bottom:10px;flex:0 0 auto;margin-right:15px;align-items:center;}.neodb-titleDate__day{font-weight:900;font-size:44px;}.neodb-titleDate__month{font-size:14px;color:var(--farallon-text-light);font-weight:900;}.neodb-list__card{display:block;}.neodb-dateList__card{display:flex;flex-wrap:wrap;align-items:flex-start;}.neodb-listBydate{display:flex;align-items:flex-start;margin-top:15px;}@media (max-width:600px){.neodb-listBydate{flex-direction:column;}}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -17,7 +17,7 @@
|
||||
is_single = false;
|
||||
post_id = 0;
|
||||
is_archive = false;
|
||||
VERSION = "0.6.2";
|
||||
VERSION = "0.6.3";
|
||||
constructor() {
|
||||
super();
|
||||
this.initCopyright();
|
||||
|
||||
Vendored
+38
File diff suppressed because one or more lines are too long
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
class NeoDB {
|
||||
constructor(config) {
|
||||
this.container = config.container;
|
||||
this.types = config.types ?? ["book", "movie", "tv", "music", "game", "podcast"];
|
||||
this.baseAPI = config.baseAPI;
|
||||
this.type = "movie";
|
||||
this.status = "complete";
|
||||
this.finished = false;
|
||||
this.paged = 1;
|
||||
this.subjects = [];
|
||||
this._create();
|
||||
}
|
||||
|
||||
on(event, element, callback) {
|
||||
const nodeList = document.querySelectorAll(element);
|
||||
nodeList.forEach((item) => {
|
||||
item.addEventListener(event, callback);
|
||||
});
|
||||
}
|
||||
|
||||
_handleTypeClick() {
|
||||
this.on("click", ".neodb-navItem", (t) => {
|
||||
const self = t.currentTarget;
|
||||
if (self.classList.contains("current")) return;
|
||||
this.type = self.dataset.type;
|
||||
document.querySelector(".neodb-list").innerHTML = "";
|
||||
document.querySelector(".lds-ripple").classList.remove("u-hide");
|
||||
document.querySelector(".neodb-navItem.current").classList.remove("current");
|
||||
self.classList.add("current");
|
||||
this.paged = 1;
|
||||
this.finished = false;
|
||||
this.subjects = [];
|
||||
this._fetchData();
|
||||
});
|
||||
}
|
||||
|
||||
_renderTypes() {
|
||||
document.querySelector(".neodb-nav").innerHTML = this.types
|
||||
.map((item) => {
|
||||
return `<span class="neodb-navItem${
|
||||
this.type == item ? " current" : ""
|
||||
}" data-type="${item}">${item}</span>`;
|
||||
})
|
||||
.join("");
|
||||
this._handleTypeClick();
|
||||
}
|
||||
|
||||
_fetchData() {
|
||||
const params = new URLSearchParams({
|
||||
type: "complete",
|
||||
category: this.type,
|
||||
page: this.paged.toString(),
|
||||
});
|
||||
|
||||
return fetch(this.baseAPI + "?" + params.toString())
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
if (data.length) {
|
||||
// 过滤重复项
|
||||
data = data.filter(item => !this.subjects.some(existing => existing.item.id === item.item.id));
|
||||
|
||||
if (data.length) {
|
||||
this.subjects = [...this.subjects, ...data];
|
||||
this._renderListTemplate();
|
||||
}
|
||||
|
||||
document.querySelector(".lds-ripple").classList.add("u-hide");
|
||||
} else {
|
||||
this.finished = true; // 没有更多数据
|
||||
document.querySelector(".lds-ripple").classList.add("u-hide");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_renderListTemplate() {
|
||||
document.querySelector(".neodb-list").innerHTML = this.subjects
|
||||
.map((item) => {
|
||||
const coverImage = item.item.cover_image_url;
|
||||
const title = item.item.title;
|
||||
const rating = item.item.rating;
|
||||
const link = item.item.id;
|
||||
|
||||
return `<div class="neodb-item">
|
||||
<img src="${coverImage}" referrerpolicy="no-referrer" class="neodb-image">
|
||||
<div class="neodb-score">
|
||||
${rating ? `<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>${rating}` : ""}
|
||||
</div>
|
||||
<div class="neodb-title">
|
||||
<a href="${link}" target="_blank">${title}</a>
|
||||
</div>
|
||||
|
||||
</div>`;
|
||||
})
|
||||
.join("");
|
||||
}
|
||||
|
||||
_handleScroll() {
|
||||
let isLoading = false; // 标志位,表示是否正在加载数据
|
||||
let lastScrollTop = 0; // 上一次的滚动位置
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
const scrollY = window.scrollY || window.pageYOffset;
|
||||
const moreElement = document.querySelector(".block-more");
|
||||
|
||||
// 检查滚动到底部的条件
|
||||
if (
|
||||
moreElement.offsetTop + moreElement.clientHeight <= scrollY + window.innerHeight &&
|
||||
document.querySelector(".lds-ripple").classList.contains("u-hide") &&
|
||||
!this.finished &&
|
||||
!isLoading // 确保没有正在加载数据
|
||||
) {
|
||||
isLoading = true; // 设置标志位为 true,表示正在加载数据
|
||||
document.querySelector(".lds-ripple").classList.remove("u-hide");
|
||||
this.paged++;
|
||||
this._fetchData().finally(() => {
|
||||
isLoading = false; // 数据加载完成后,重置标志位
|
||||
});
|
||||
}
|
||||
|
||||
// 更新上一次的滚动位置
|
||||
lastScrollTop = scrollY;
|
||||
});
|
||||
}
|
||||
|
||||
_create() {
|
||||
if (document.querySelector(".neodb-container")) {
|
||||
const container = document.querySelector(this.container);
|
||||
if (!container) return;
|
||||
container.innerHTML = `
|
||||
<nav class="neodb-nav"></nav>
|
||||
<div class="neodb-list"></div>
|
||||
<div class="block-more block-more__centered">
|
||||
<div class="lds-ripple"></div>
|
||||
</div>
|
||||
`;
|
||||
this._renderTypes();
|
||||
this._fetchData();
|
||||
this._handleScroll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* ViewImage.min.js 2.0.2
|
||||
* MIT License - http://www.opensource.org/licenses/mit-license.php
|
||||
* https://tokinx.github.io/ViewImage/
|
||||
*/
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,a){b.raw=a;return b};$jscomp.arrayIteratorImpl=function(b){var a=0;return function(){return a<b.length?{done:!1,value:b[a++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var a="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return a?a.call(b):$jscomp.arrayIterator(b)};
|
||||
$jscomp.arrayFromIterator=function(b){for(var a,d=[];!(a=b.next()).done;)d.push(a.value);return d};$jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};
|
||||
(function(){window.ViewImage=new function(){var b=this;this.target="[view-image] img";this.listener=function(a){if(!(a.ctrlKey||a.metaKey||a.shiftKey||a.altKey)){var d=String(b.target.split(",").map(function(g){return g.trim()+":not([no-view])"})),c=a.target.closest(d);if(c){var e=c.closest("[view-image]")||document.body;d=[].concat($jscomp.arrayFromIterable(e.querySelectorAll(d))).map(function(g){return g.href||g.src});b.display(d,c.href||c.src);a.stopPropagation();a.preventDefault()}}};this.init=
|
||||
function(a){a&&(b.target=a);["removeEventListener","addEventListener"].forEach(function(d){document[d]("click",b.listener,!1)})};this.display=function(a,d){var c=a.indexOf(d),e=(new DOMParser).parseFromString('\n <div class="view-image">\n <style>.view-image{position:fixed;inset:0;z-index:500;padding:1rem;display:flex;flex-direction:column;animation:view-image-in 300ms;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.view-image__out{animation:view-image-out 300ms}@keyframes view-image-in{0%{opacity:0}}@keyframes view-image-out{100%{opacity:0}}.view-image-btn{width:32px;height:32px;display:flex;justify-content:center;align-items:center;cursor:pointer;border-radius:3px;background-color:rgba(255,255,255,0.2)}.view-image-btn:hover{background-color:rgba(255,255,255,0.5)}.view-image-close__full{position:absolute;inset:0;background-color:rgba(48,55,66,0.3);z-index:unset;cursor:zoom-out;margin:0}.view-image-container{height:0;flex:1;display:flex;align-items:center;justify-content:center;}.view-image-lead{display:contents}.view-image-lead img{position:relative;z-index:1;max-width:100%;max-height:100%;object-fit:contain;border-radius:3px}.view-image-lead__in img{animation:view-image-lead-in 300ms}.view-image-lead__out img{animation:view-image-lead-out 300ms forwards}@keyframes view-image-lead-in{0%{opacity:0;transform:translateY(-20px)}}@keyframes view-image-lead-out{100%{opacity:0;transform:translateY(20px)}}[class*=__out] ~ .view-image-loading{display:block}.view-image-loading{position:absolute;inset:50%;width:8rem;height:2rem;color:#aab2bd;overflow:hidden;text-align:center;margin:-1rem -4rem;z-index:1;display:none}.view-image-loading::after{content:"";position:absolute;inset:50% 0;width:100%;height:3px;background:rgba(255,255,255,0.5);transform:translateX(-100%) translateY(-50%);animation:view-image-loading 800ms -100ms ease-in-out infinite}@keyframes view-image-loading{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}.view-image-tools{position:relative;display:flex;justify-content:space-between;align-content:center;color:#fff;max-width:600px;position: absolute; bottom: 5%; left: 1rem; right: 1rem; backdrop-filter: blur(10px);margin:0 auto;padding:10px;border-radius:5px;background:rgba(0,0,0,0.1);margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom);z-index:1}.view-image-tools__count{width:60px;display:flex;align-items:center;justify-content:center}.view-image-tools__flip{display:flex;gap:10px}.view-image-tools [class*=-close]{margin:0 10px}</style>\n <div class="view-image-container">\n <div class="view-image-lead"></div>\n <div class="view-image-loading"></div>\n <div class="view-image-close view-image-close__full"></div>\n </div>\n <div class="view-image-tools">\n <div class="view-image-tools__count">\n <span><b class="view-image-index">'+
|
||||
(c+1)+"</b>/"+a.length+'</span>\n </div>\n <div class="view-image-tools__flip">\n <div class="view-image-btn view-image-tools__flip-prev">\n <svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" fill="white" fill-opacity="0.01"/><path d="M31 36L19 24L31 12" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>\n </div>\n <div class="view-image-btn view-image-tools__flip-next">\n <svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" fill="white" fill-opacity="0.01"/><path d="M19 12L31 24L19 36" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>\n </div>\n </div>\n <div class="view-image-btn view-image-close">\n <svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" fill="white" fill-opacity="0.01"/><path d="M8 8L40 40" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 40L40 8" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>\n </div>\n </div>\n </div>\n ',
|
||||
"text/html").body.firstChild,g=function(f){var h={Escape:"close",ArrowLeft:"tools__flip-prev",ArrowRight:"tools__flip-next"};h[f.key]&&e.querySelector(".view-image-"+h[f.key]).click()},l=function(f){var h=new Image,k=e.querySelector(".view-image-lead");k.className="view-image-lead view-image-lead__out";setTimeout(function(){k.innerHTML="";h.onload=function(){setTimeout(function(){k.innerHTML='<img src="'+h.src+'" alt="ViewImage" no-view/>';k.className="view-image-lead view-image-lead__in"},100)};
|
||||
h.src=f},300)};document.body.appendChild(e);l(d);window.addEventListener("keydown",g);e.onclick=function(f){f.target.closest(".view-image-close")?(window.removeEventListener("keydown",g),e.onclick=null,e.classList.add("view-image__out"),setTimeout(function(){return e.remove()},290)):f.target.closest(".view-image-tools__flip")&&(c=f.target.closest(".view-image-tools__flip-prev")?0===c?a.length-1:c-1:c===a.length-1?0:c+1,l(a[c]),e.querySelector(".view-image-index").innerHTML=c+1)}}}})();
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+101
-98
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
||||
require_once 'qqwry.php';
|
||||
function themeConfig($form) {
|
||||
$logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点 LOGO 地址'));
|
||||
$form->addInput($logoUrl);
|
||||
@@ -52,10 +51,6 @@ function themeConfig($form) {
|
||||
array('0'=> _t('否'), '1'=> _t('是')),
|
||||
'0', _t('是否显示页面加载时间'), _t('选择“是”将在页脚显示加载时间。'));
|
||||
$form->addInput($showtime);
|
||||
$qqboturl = new Typecho_Widget_Helper_Form_Element_Text('qqboturl', NULL, 'https://bot.asbid.cn', _t('QQ机器人API,保持默认则需添加 2280858259 为好友'), _t('基于cqhttp,有评论时QQ通知'));
|
||||
$form->addInput($qqboturl);
|
||||
$qqnum = new Typecho_Widget_Helper_Form_Element_Text('qqnum', NULL, '122790336', _t('QQ号码'), _t('用于接收QQ通知的号码'));
|
||||
$form->addInput($qqnum);
|
||||
}
|
||||
function get_post_view($archive) {
|
||||
$cid = $archive->cid;
|
||||
@@ -138,63 +133,104 @@ function getPermalinkFromCoid($coid) {
|
||||
if (empty($row)) return '';
|
||||
return '<a href="#comment-'.$coid.'" style="text-decoration: none;">@'.$row['author'].'</a>';
|
||||
}
|
||||
// 评论提交通知函数
|
||||
function notifyQQBot($comment) {
|
||||
$options = Helper::options();
|
||||
// 检查评论是否已经审核通过
|
||||
if ($comment->status != "approved") {
|
||||
error_log('Comment is not approved.');
|
||||
return;
|
||||
}
|
||||
// 获取配置中的QQ机器人API地址
|
||||
$cq_url = $options->qqboturl;
|
||||
// 检查API地址是否为空
|
||||
if (empty($cq_url)) {
|
||||
error_log('QQ Bot URL is empty. Using default URL.');
|
||||
$cq_url = 'https://bot.asbid.cn';
|
||||
|
||||
/**
|
||||
* 图片灯箱
|
||||
*/
|
||||
class ImageStructureProcessor {
|
||||
public static function processContent($content, $widget) {
|
||||
// 首先检查内容是否为空
|
||||
if (empty($content) || !is_string($content)) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
if ($widget instanceof Widget_Archive) {
|
||||
try {
|
||||
// 使用 DOM 操作确保结构完整性
|
||||
$dom = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
// 添加错误处理
|
||||
libxml_use_internal_errors(true);
|
||||
|
||||
// 添加基础 HTML 结构以确保正确解析
|
||||
$content = '<div>' . $content . '</div>';
|
||||
|
||||
// 转换编码并加载内容
|
||||
$content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8');
|
||||
$dom->loadHTML($content,
|
||||
LIBXML_HTML_NOIMPLIED |
|
||||
LIBXML_HTML_NODEFDTD |
|
||||
LIBXML_NOERROR |
|
||||
LIBXML_NOWARNING
|
||||
);
|
||||
|
||||
$xpath = new DOMXPath($dom);
|
||||
|
||||
// 查找所有没有父 figure 的图片
|
||||
$images = $xpath->query("//img[not(ancestor::figure)]");
|
||||
|
||||
if ($images->length > 0) {
|
||||
foreach ($images as $img) {
|
||||
// 获取必要的属性
|
||||
$src = $img->getAttribute('src');
|
||||
$alt = $img->getAttribute('alt');
|
||||
|
||||
if (empty($src)) {
|
||||
continue; // 跳过没有 src 的图片
|
||||
}
|
||||
|
||||
// 创建容器元素
|
||||
$figure = $dom->createElement('figure');
|
||||
$figure->setAttribute('class', 'grap--figure');
|
||||
|
||||
// 创建链接元素用于lightbox
|
||||
$link = $dom->createElement('a');
|
||||
$link->setAttribute('href', $src);
|
||||
$link->setAttribute('data-lightbox', 'image-set');
|
||||
$link->setAttribute('data-title', $alt);
|
||||
$link->setAttribute('class', 'no-style-link');
|
||||
|
||||
// 只有在有 alt 属性时才创建 figcaption
|
||||
if (!empty($alt)) {
|
||||
$caption = $dom->createElement('figcaption', $alt);
|
||||
$caption->setAttribute('class', 'imageCaption');
|
||||
}
|
||||
|
||||
// 重组 DOM 结构
|
||||
if ($img->parentNode) {
|
||||
$img->parentNode->replaceChild($figure, $img);
|
||||
$link->appendChild($img);
|
||||
$figure->appendChild($link);
|
||||
if (isset($caption)) {
|
||||
$figure->appendChild($caption);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取处理后的内容
|
||||
$content = $dom->saveHTML();
|
||||
|
||||
// 清理临时添加的 div 标签
|
||||
$content = preg_replace('/^<div>|<\/div>$/i', '', $content);
|
||||
|
||||
// 清理 libxml 错误
|
||||
libxml_clear_errors();
|
||||
|
||||
} catch (Exception $e) {
|
||||
// 记录错误但返回原始内容
|
||||
error_log('Image processing error: ' . $e->getMessage());
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
// 获取QQ号码
|
||||
$qqnum = $options->qqnum;
|
||||
// 检查QQ号码是否为空
|
||||
if (empty($qqnum)) {
|
||||
error_log('QQ number is empty.');
|
||||
return;
|
||||
}
|
||||
// 如果是管理员自己发的评论则不发送通知
|
||||
if ($comment->authorId === $comment->ownerId) {
|
||||
error_log('This comment is by the post owner.');
|
||||
return;
|
||||
}
|
||||
// 构建消息内容
|
||||
$msg = '「' . $comment->author . '」在文章《' . $comment->title . '》中发表了评论!';
|
||||
$msg .= "\n评论内容:\n{$comment->text}\n永久链接地址:{$comment->permalink}";
|
||||
// 准备发送消息的数据
|
||||
$_message_data_ = [
|
||||
'user_id' => (int) trim($qqnum),
|
||||
'message' => str_replace(["\r\n", "\r", "\n"], "\r\n", htmlspecialchars_decode(strip_tags($msg)))
|
||||
];
|
||||
// 输出调试信息
|
||||
error_log('Sending message to QQ Bot: ' . print_r($_message_data_, true));
|
||||
// 初始化Curl请求
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => "{$cq_url}/send_msg?" . http_build_query($_message_data_, '', '&'),
|
||||
CURLOPT_CONNECTTIMEOUT => 10,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_HEADER => false,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_SSL_VERIFYHOST => 0
|
||||
]);
|
||||
$response = curl_exec($ch);
|
||||
if (curl_errno($ch)) {
|
||||
error_log('Curl error: ' . curl_error($ch));
|
||||
} else {
|
||||
error_log('Response: ' . $response);
|
||||
}
|
||||
curl_close($ch);
|
||||
}
|
||||
Typecho_Plugin::factory('Widget_Feedback')->finishComment = 'notifyQQBot';
|
||||
|
||||
Typecho_Plugin::factory('Widget_Abstract_Contents')->contentEx = function($content, $widget) {
|
||||
return ImageStructureProcessor::processContent($content, $widget);
|
||||
};
|
||||
|
||||
//获取文章卡片
|
||||
function get_article_info($atts) {
|
||||
@@ -336,41 +372,25 @@ function commentApprove($widget, $email = NULL)
|
||||
"commentNum" => 0//评论数量
|
||||
);
|
||||
if (empty($email)) return $result;
|
||||
|
||||
$result['state'] = 1;
|
||||
$master = array(
|
||||
'基友邮箱1@qq.com',
|
||||
'基友邮箱1@qq.com'
|
||||
);
|
||||
$result['state'] = 1;
|
||||
if ($widget->authorId == $widget->ownerId) {
|
||||
$result['isAuthor'] = 1;
|
||||
$result['userLevel'] = '博主';
|
||||
$result['userDesc'] = '很帅的博主';
|
||||
$result['userLevel'] = '作者';
|
||||
$result['userDesc'] = '博主';
|
||||
$result['bgColor'] = '#FFD700';
|
||||
$result['commentNum'] = 999;
|
||||
} else if (in_array($email, $master)) {
|
||||
$result['userLevel'] = '基友';
|
||||
$result['userDesc'] = '很帅的基友';
|
||||
$result['bgColor'] = '#65C186';
|
||||
$result['commentNum'] = 888;
|
||||
} else {
|
||||
//数据库获取
|
||||
$db = Typecho_Db::get();
|
||||
//获取评论条数
|
||||
$commentNumSql = $db->fetchAll($db->select(array('COUNT(cid)'=>'commentNum'))
|
||||
->from('table.comments')
|
||||
->where('mail = ?', $email));
|
||||
$commentNum = $commentNumSql[0]['commentNum'];
|
||||
|
||||
//获取友情链接
|
||||
$linkSql = $db->fetchAll($db->select()->from('table.links')
|
||||
->where('user = ?',$email));
|
||||
|
||||
//等级判定
|
||||
if($commentNum==1){
|
||||
$result['userLevel'] = '初识';
|
||||
$result['bgColor'] = '#999999';
|
||||
$userDesc = '你已经向目的地迈出了第一步!';
|
||||
$userDesc = '初来乍到的新朋友';
|
||||
} else {
|
||||
if ($commentNum<3 && $commentNum>1) {
|
||||
$result['userLevel'] = '初识';
|
||||
@@ -391,7 +411,7 @@ function commentApprove($widget, $email = NULL)
|
||||
$result['userLevel'] = '老铁';
|
||||
$result['bgColor'] = '#A0DAD0';
|
||||
}
|
||||
$userDesc = '你已经向目的地前进了'.$commentNum.'步!';
|
||||
$userDesc = '已有'.$commentNum.'条评论';
|
||||
}
|
||||
if($linkSql){
|
||||
$result['userLevel'] = '博友';
|
||||
@@ -404,20 +424,3 @@ function commentApprove($widget, $email = NULL)
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/** 获取评论者地址 */
|
||||
function get_ip_location($ip) {
|
||||
$qqwry = new QQWry(__DIR__ . '/dist/qqwry.dat');
|
||||
$detail = $qqwry->getDetail($ip);
|
||||
if ($detail) {
|
||||
// Assuming dataA is country and dataB is province
|
||||
return array(
|
||||
'country' => $detail['dataA']
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'country' => 'Unknown'
|
||||
);
|
||||
}
|
||||
}
|
||||
+9
-13
@@ -1,12 +1,8 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<html lang="zh-CN">
|
||||
<meta charset="<?php $this->options->charset(); ?>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
@@ -26,7 +22,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php $this->options->addhead(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
<script>
|
||||
window.DEFAULT_THEME = "light";
|
||||
if (localStorage.getItem("theme") == null) {
|
||||
localStorage.setItem("theme", window.DEFAULT_THEME);
|
||||
@@ -63,14 +59,14 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- 这年头谁会用站内的搜索啊 -->
|
||||
<div class="search--area">
|
||||
<form id="search" method="post" action="./" role="search" class="search-form">
|
||||
<label>
|
||||
<input type="text" name="s" class="search-field text" placeholder="Search" required/>
|
||||
</label>
|
||||
<button type="submit" class="search-submit submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="search--area">
|
||||
<form id="search" method="post" action="./" role="search" class="search-form">
|
||||
<label>
|
||||
<input type="text" name="s" class="search-field text" placeholder="Search" required/>
|
||||
</label>
|
||||
<button type="submit" class="search-submit submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<svg class="svgIcon" width="25" height="25" data-action="show-search">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 一款单栏主题. 移植自HUGO主题 Farallon 原作者 bigfa
|
||||
* @package Farallon
|
||||
* @author 老孙
|
||||
* @version 0.6.2
|
||||
* @version 0.6.3
|
||||
* @link https://www.imsun.org
|
||||
*/
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/**
|
||||
* 文章归档
|
||||
*
|
||||
@@ -20,7 +20,8 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
$output = '<div class="archives">'; // Start archives container
|
||||
while ($archives->next()) {
|
||||
$year_tmp = date('Y', $archives->created);
|
||||
$mon_tmp = date('m', $archives->created);
|
||||
$mon_tmp = date('m', $archives->created);
|
||||
|
||||
// 检查是否需要新的年份标题
|
||||
if ($year != $year_tmp) {
|
||||
if ($year > 0) {
|
||||
@@ -28,7 +29,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
}
|
||||
$year = $year_tmp;
|
||||
$mon = 0; // 重置月份
|
||||
$output .= '<div class="archive-year"><h2 class="archive--title__year">' . $year . '</h2>'; // 开始新的年份div
|
||||
$output .= '<div class="archive-year"><h2 class="archive--title__year">' . $year . '年</h2>'; // 开始新的年份div
|
||||
}
|
||||
// 检查是否需要新的月份标题
|
||||
if ($mon != $mon_tmp) {
|
||||
@@ -36,7 +37,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
$output .= '</ul>'; // 结束上一个月份的列表
|
||||
}
|
||||
$mon = $mon_tmp;
|
||||
$output .= '<h3 class="archive--title__month"></h3>';// '. $mon . '
|
||||
$output .= '<h3 class="archive--title__month">' . $mon . '月</h3>';
|
||||
$output .= '<ul class="archive--list">'; // 开始新的月份列表
|
||||
}
|
||||
// 输出文章项
|
||||
@@ -56,5 +57,4 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
|
||||
<?php $this->need('footer.php'); ?>
|
||||
+2
-2
@@ -13,7 +13,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
</header>
|
||||
<section class="category--list">
|
||||
<?php $this->widget('Widget_Metas_Category_List')->to($categories); ?>
|
||||
<?php while($categories->next()): ?>
|
||||
<?php while($categories->next()): ?>
|
||||
<?php
|
||||
// 获取分类 ID
|
||||
$categoryId = $categories->mid;
|
||||
@@ -30,7 +30,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
</section>
|
||||
</div>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
+14
-7
@@ -14,7 +14,8 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<article class="post--single">
|
||||
<?php $tooot = $this->fields->tooot ? $this->fields->tooot : 'https://bbapi.ima.cm'; ?>
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/marked.min.js'); ?>"></script>
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/view-image.min.js'); ?>"></script>
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('/dist/css/lightbox.min.css'); ?>">
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/lightbox-plus-jquery.min.js'); ?>"></script>
|
||||
<div id="tooot"></div>
|
||||
<div class="nav-links" id="loadmore">
|
||||
<span class="loadmore">加载更多</span>
|
||||
@@ -24,16 +25,24 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
window.onload = function() {
|
||||
let offset = 0; // 初始偏移量
|
||||
const limit = 20; // 每次加载的数量
|
||||
|
||||
function formatHTML(toots) {
|
||||
let htmlString = '';
|
||||
toots.forEach(toot => {
|
||||
const { content, account, url, created_at, media_attachments} = toot;
|
||||
// 判断是否存在 reblog
|
||||
const isReblog = toot.reblog && toot.reblog.content;
|
||||
const content = isReblog ? toot.reblog.content : toot.content;
|
||||
const url = isReblog ? toot.reblog.url : toot.url;
|
||||
const account = isReblog ? toot.reblog.account : toot.account;
|
||||
const created_at = isReblog ? toot.reblog.created_at : toot.created_at;
|
||||
const media_attachments = isReblog ? toot.reblog.media_attachments : toot.media_attachments;
|
||||
|
||||
let mediaHTML = ''; // 初始化资源相关HTML为空字符串
|
||||
// 处理媒体附件
|
||||
if (media_attachments.length > 0) {
|
||||
media_attachments.forEach(attachment => {
|
||||
if (attachment.type === 'image') {
|
||||
mediaHTML += `<a href="${attachment.url}" target="_blank"><img src="${attachment.preview_url}" class="thumbnail-image img" ></a>`;
|
||||
mediaHTML += `<a href="${attachment.url}" target="_blank" data-lightbox="image-set"><img src="${attachment.preview_url}" class="thumbnail-image img" ></a>`;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -81,13 +90,11 @@ window.onload = function() {
|
||||
// 绑定“加载更多”按钮的点击事件
|
||||
document.getElementById('loadmore').addEventListener('click', fetchAndDisplayToots);
|
||||
};
|
||||
window.ViewImage && ViewImage.init('.content img');
|
||||
</script>
|
||||
<style>
|
||||
div pre code {
|
||||
/* 迫使文字断行 */
|
||||
white-space: pre-wrap; /* CSS3 */
|
||||
word-wrap: break-word; /* 老版本的浏览器 */
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
|
||||
+3
-3
@@ -19,7 +19,8 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
?>
|
||||
<article class="post--single">
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/marked.min.js'); ?>"></script>
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/view-image.min.js'); ?>"></script>
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('/dist/css/lightbox.min.css'); ?>">
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/lightbox-plus-jquery.min.js'); ?>"></script>
|
||||
<div id="talk"></div>
|
||||
<div class="nav-links" id="loadmore">
|
||||
<span class="loadmore">加载更多</span>
|
||||
@@ -82,7 +83,7 @@ function Format(item) {
|
||||
content = text.replace(/\[(.*?)\]\((.*?)\)/g, `<a href="$2" target="_blank">$1</a>`);
|
||||
if (imgs) {
|
||||
content += `<div class="resimg">`
|
||||
imgs.forEach(e => content += `<a href="${e}" class="img" data-thumb="${e}"><img class="no-lazyload thumbnail-image" src="${e}"></a>`
|
||||
imgs.forEach(e => content += `<a href="${e}" class="img" data-thumb="${e}" data-lightbox="images"><img class="no-lazyload thumbnail-image" src="${e}"></a>`
|
||||
)
|
||||
content += '</div>'
|
||||
}
|
||||
@@ -114,7 +115,6 @@ document.getElementById('loadmore').addEventListener('click', function() {
|
||||
loadMemos(currentPage);
|
||||
});
|
||||
|
||||
window.ViewImage && ViewImage.init('.content img');
|
||||
</script>
|
||||
<style>
|
||||
div pre code {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Neodb 页面
|
||||
*
|
||||
* @package custom
|
||||
*/
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php $this->need('header.php'); ?>
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('/dist/css/neodb.css'); ?>">
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/neodb.js'); ?>"></script>
|
||||
<section class="site--main">
|
||||
<header class="archive--header">
|
||||
<h1 class="post--single__title"><?php $this->title() ?></h1>
|
||||
<h2 class="post--single__subtitle"><?php $this->content(); ?></h2>
|
||||
</header>
|
||||
<div class="site--main">
|
||||
<div class="neodb-container"></div>
|
||||
<?php $neodb = $this->fields->neodb ? $this->fields->neodb : 'https://neodb.imsun.org'; ?>
|
||||
<script>
|
||||
const neodb = new NeoDB({
|
||||
container: ".neodb-container",
|
||||
baseAPI: "<?php echo $neodb; ?>/api",
|
||||
types: ["book", "movie", "tv", "music", "game"],
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
+15
-13
@@ -12,18 +12,20 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<h2 class="post--single__subtitle"><?php $this->content(); ?> </h2>
|
||||
</header>
|
||||
<div class="post-content">
|
||||
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0')->to($tags); ?>
|
||||
<?php if($tags->have()): ?>
|
||||
<div class="archive--tagList">
|
||||
<?php while ($tags->next()): ?>
|
||||
<span class="archive--tagItem">
|
||||
<a role="listitem" target="<?php $this->options->sidebarLinkOpen(); ?>" data-toggle="tooltip" data-placement="top" href="<?php $tags->permalink(); ?>" rel="tag" title="<?php $tags->count(); ?> 篇文章"><?php $tags->name(); ?> (<?php $tags->count(); ?>)</a>
|
||||
</span>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-center pb-2"><?php _e('没有任何标签'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0')->to($tags); ?>
|
||||
<?php if($tags->have()): ?>
|
||||
<div class="archive--tagList">
|
||||
<?php while ($tags->next()): ?>
|
||||
<span class="archive--tagItem">
|
||||
<a role="listitem" target="<?php $this->options->sidebarLinkOpen(); ?>" data-toggle="tooltip" data-placement="top" href="<?php $tags->permalink(); ?>" rel="tag" title="<?php $tags->count(); ?> 篇文章">
|
||||
<?php $tags->name(); ?> (<?php $tags->count(); ?>)
|
||||
</a>
|
||||
</span>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-center pb-2"><?php _e('没有任何标签'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
@@ -97,7 +97,6 @@
|
||||
//复制方法
|
||||
copy: function () {
|
||||
var that = this;
|
||||
//注意vue umd版本ClipboardJS,而ES包请使用Clipboard
|
||||
var clipboard = new ClipboardJS(".link",{
|
||||
text: function (trigger) {
|
||||
//返回字符串
|
||||
@@ -118,7 +117,6 @@
|
||||
toast.textContent = "复制成功!";
|
||||
toast.className = "notice--wrapper";
|
||||
document.body.appendChild(toast);
|
||||
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(toast);
|
||||
}, 3000);
|
||||
@@ -141,7 +139,6 @@
|
||||
<?php
|
||||
// 初始化分类图片地址为空
|
||||
$categoryImage = '';
|
||||
|
||||
// 检查文章是否有分类
|
||||
if ($this->categories) {
|
||||
// 获取第一个分类的信息
|
||||
@@ -149,15 +146,12 @@
|
||||
$categoryId = $category['mid'];
|
||||
$categoryName = $category['name'];
|
||||
$categoryDescription = $category['description']; // 如果分类有说明(描述)
|
||||
|
||||
// 获取主题选项中的分类图片基本 URL
|
||||
$themeUrl = $this->options->midimg;
|
||||
|
||||
// 生成分类图片地址
|
||||
$categoryImage = $themeUrl . $categoryId . '.jpg';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 显示分类信息 -->
|
||||
<?php if ($category): ?>
|
||||
<div class="category--card__list">
|
||||
@@ -202,7 +196,6 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
const targetClassElement = document.querySelector('.post--single__title');
|
||||
const postContent = document.querySelector('.post--single__content');
|
||||
if (!postContent) return;
|
||||
|
||||
let found = false;
|
||||
for (let i = 1; i <= 6 &&!found; i++) {
|
||||
if (postContent.querySelector(`h${i}`)) {
|
||||
@@ -210,21 +203,17 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
}
|
||||
}
|
||||
if (!found) return;
|
||||
|
||||
const heads = postContent.querySelectorAll('h1, h2, h3, h4, h5, h6');
|
||||
const toc = document.createElement('div');
|
||||
toc.id = 'toc';
|
||||
toc.innerHTML = '<details class="toc" open><summary class="toc-title">目录</summary><nav id="TableOfContents"><ul></ul></nav></details>';
|
||||
|
||||
// 插入到指定 class 元素之后
|
||||
if (targetClassElement) {
|
||||
targetClassElement.parentNode.insertBefore(toc, targetClassElement.nextSibling);
|
||||
}
|
||||
|
||||
let currentLevel = 0;
|
||||
let currentList = toc.querySelector('ul');
|
||||
let levelCounts = [0];
|
||||
|
||||
heads.forEach((head, index) => {
|
||||
const level = parseInt(head.tagName.substring(1));
|
||||
if (levelCounts[level] === undefined) {
|
||||
@@ -293,17 +282,13 @@ function fetchWithRetry(url, retries = 3) {
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const doubanLinks = document.querySelectorAll('a[href^="https://movie.douban.com/subject/"]');
|
||||
|
||||
doubanLinks.forEach(link => {
|
||||
const url = link.href;
|
||||
const movieId = url.match(/subject\/(\d+)/)[1];
|
||||
|
||||
link.innerHTML += ' <span class="loading">(加载中...)</span>';
|
||||
|
||||
fetchWithRetry(`<?php $this->options->themeUrl('db.php'); ?>?id=${movieId}`)
|
||||
fetchWithRetry(`https://api.loliko.cn/movies/${movieId}`)
|
||||
.then(data => {
|
||||
const movieInfo = createMovieInfoHTML(data, url);
|
||||
const wrapper = document.createElement('div');
|
||||
@@ -323,12 +308,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function createMovieInfoHTML(data, originalUrl) {
|
||||
if (!data || data.error || Object.keys(data).length === 0) {
|
||||
return `<a href="${originalUrl}" target="_blank">查看豆瓣电影详情</a>`;
|
||||
}
|
||||
|
||||
return `
|
||||
<div class=doulist-item>
|
||||
<div class=doulist-subject>
|
||||
@@ -348,10 +331,9 @@ function createMovieInfoHTML(data, originalUrl) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="<?php $this->options->themeUrl('/dist/css/lightbox.min.css'); ?>">
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/lightbox-plus-jquery.min.js'); ?>"></script>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
+7
-6
@@ -116,9 +116,7 @@ foreach ($normalPosts as $normalPost) {
|
||||
</a>
|
||||
</h2>
|
||||
<div class="description">
|
||||
<!-- 本功能实现 借助插件 AIsummary 实现 -->
|
||||
<?php
|
||||
// 判断是否存在自定义字段summary并输出,否则输出自动生成的摘要
|
||||
<?php
|
||||
if($this->fields->summary){
|
||||
echo $this->fields->summary;
|
||||
} else {
|
||||
@@ -158,10 +156,13 @@ foreach ($normalPosts as $normalPost) {
|
||||
$firstImage = img_postthumb($this->cid);
|
||||
$cover = $this->fields->cover;
|
||||
$imageToDisplay = !empty($cover) ? $cover : $firstImage;
|
||||
if($imageToDisplay): ?>
|
||||
<img src="<?php echo $imageToDisplay; ?>" alt="文章图片" class="cover"/>
|
||||
if($imageToDisplay):
|
||||
?>
|
||||
<a href="<?php $this->permalink() ?>" class="cover--link">
|
||||
<img src="<?php echo $imageToDisplay; ?>" alt="<?php $this->title() ?>" class="cover" itemprop="image"/>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php
|
||||
$this->pageNav(
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
<?php
|
||||
// 数据来源:纯真IP数据库 qqwry.dat
|
||||
// 初始化类:new QQWry($fileName)
|
||||
// 请求方式:getDetail($ip)
|
||||
// 返回格式:
|
||||
// {
|
||||
// "beginIP": IP段起始点
|
||||
// "endIP": IP段结束点
|
||||
// "dataA": 数据段1
|
||||
// "dataB": 数据段2
|
||||
// }
|
||||
//
|
||||
// 请求版本:getVersion()
|
||||
// 返回格式:YYYYMMDD
|
||||
|
||||
class QQWry {
|
||||
private $fp; // 文件指针
|
||||
private $firstRecord; // 第一条记录的偏移地址
|
||||
private $lastRecord; // 最后一条记录的偏移地址
|
||||
private $recordNum; // 总记录条数
|
||||
|
||||
public function __construct($fileName) { // 构造函数
|
||||
$this->fp = fopen($fileName, 'rb');
|
||||
$this->firstRecord = $this->read4byte();
|
||||
$this->lastRecord = $this->read4byte();
|
||||
$this->recordNum = ($this->lastRecord - $this->firstRecord) / 7; // 每条索引长度为7字节
|
||||
}
|
||||
|
||||
public function __destruct() { // 析构函数
|
||||
if ($this->fp) {
|
||||
fclose($this->fp);
|
||||
}
|
||||
}
|
||||
|
||||
private function read4byte() { // 读取4字节并转为long
|
||||
return unpack('Vlong', fread($this->fp, 4))['long'];
|
||||
}
|
||||
|
||||
private function read3byte() { // 读取3字节并转为long
|
||||
return unpack('Vlong', fread($this->fp, 3) . chr(0))['long'];
|
||||
}
|
||||
|
||||
private function readString() { // 读取字符串
|
||||
$str = '';
|
||||
$char = fread($this->fp, 1);
|
||||
while (ord($char) != 0) { // 读到二进制0结束
|
||||
$str .= $char;
|
||||
$char = fread($this->fp, 1);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
private function zipIP($ip) { // IP地址转为数字
|
||||
$ip_arr = explode('.', $ip);
|
||||
$tmp = (16777216 * intval($ip_arr[0])) + (65536 * intval($ip_arr[1])) + (256 * intval($ip_arr[2])) + intval($ip_arr[3]);
|
||||
return pack('N', intval($tmp)); // 32位无符号大端序长整型
|
||||
}
|
||||
|
||||
private function unzipIP($ip) { // 数字转为IP地址
|
||||
return long2ip($ip);
|
||||
}
|
||||
|
||||
public function getVersion() { // 获取当前数据库的版本
|
||||
fseek($this->fp, $this->lastRecord + 4);
|
||||
$tmp = $this->getRecord($this->read3byte())['B'];
|
||||
return substr($tmp, 0, 4) . substr($tmp, 7, 2) . substr($tmp, 12, 2);
|
||||
}
|
||||
|
||||
public function getDetail($ip) { // 获取IP地址区段及所在位置
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { // 判断是否为IPv4地址
|
||||
return null;
|
||||
}
|
||||
|
||||
fseek($this->fp, $this->searchRecord($ip)); // 跳转到对应IP记录的位置
|
||||
$detail['beginIP'] = $this->unzipIP($this->read4byte()); // 目标IP所在网段的起始IP
|
||||
$offset = $this->read3byte(); // 索引后3字节为对应记录的偏移量
|
||||
fseek($this->fp, $offset);
|
||||
$detail['endIP'] = $this->unzipIP($this->read4byte()); // 目标IP所在网段的结束IP
|
||||
|
||||
$tmp = $this->getRecord($offset); // 获取记录的dataA与dataB
|
||||
$detail['dataA'] = $tmp['A'];
|
||||
$detail['dataB'] = $tmp['B'];
|
||||
|
||||
if ($detail['beginIP'] == '255.255.255.0') { // 去除附加信息
|
||||
$detail['dataA'] = 'IANA';
|
||||
$detail['dataB'] = '保留地址';
|
||||
}
|
||||
if ($detail['dataA'] == ' CZ88.NET' || $detail['dataA'] == '纯真网络') {
|
||||
$detail['dataA'] = '';
|
||||
}
|
||||
if ($detail['dataB'] == ' CZ88.NET') {
|
||||
$detail['dataB'] = '';
|
||||
}
|
||||
return $detail;
|
||||
}
|
||||
|
||||
private function searchRecord($ip) { // 根据IP地址获取索引的绝对偏移量
|
||||
$ip = $this->zipIP($ip); // 转为数字以比较大小
|
||||
$down = 0;
|
||||
$up = $this->recordNum;
|
||||
while ($down <= $up) { // 二分法查找
|
||||
$mid = floor(($down + $up) / 2); // 计算二分点
|
||||
fseek($this->fp, $this->firstRecord + $mid * 7);
|
||||
$beginip = strrev(fread($this->fp, 4)); // 获取二分区域的下边界
|
||||
if ($ip < $beginip) { // 目标IP在二分区域以下
|
||||
$up = $mid - 1; // 缩小搜索的上边界
|
||||
} else {
|
||||
fseek($this->fp, $this->read3byte());
|
||||
$endip = strrev(fread($this->fp, 4)); // 获取二分区域的上边界
|
||||
if ($ip > $endip) { // 目标IP在二分区域以上
|
||||
$down = $mid + 1; // 缩小搜索的下边界
|
||||
} else { // 目标IP在二分区域内
|
||||
return $this->firstRecord + $mid * 7; // 返回索引的偏移量
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->lastRecord; // 无法找到对应索引,返回最后一条记录的偏移量
|
||||
}
|
||||
|
||||
private function getRecord($offset) { // 读取IP记录的数据
|
||||
fseek($this->fp, $offset + 4);
|
||||
$flag = ord(fread($this->fp, 1));
|
||||
if ($flag == 1) { // dataA与dataB均重定向
|
||||
$offset = $this->read3byte(); // 重定向偏移
|
||||
fseek($this->fp, $offset);
|
||||
if (ord(fread($this->fp, 1)) == 2) { // dataA再次重定向
|
||||
fseek($this->fp, $this->read3byte());
|
||||
$data['A'] = $this->readString();
|
||||
fseek($this->fp, $offset + 4);
|
||||
$data['B'] = $this->getDataB();
|
||||
} else { // dataA无重定向
|
||||
fseek($this->fp, -1, SEEK_CUR); // 文件指针回退1字节
|
||||
$data['A'] = $this->readString();
|
||||
$data['B'] = $this->getDataB();
|
||||
}
|
||||
} else if ($flag == 2) { // dataA重定向
|
||||
fseek($this->fp, $this->read3byte());
|
||||
$data['A'] = $this->readString();
|
||||
fseek($this->fp, $offset + 8); // IP占4字节, 重定向标志占1字节, dataA指针占3字节
|
||||
$data['B'] = $this->getDataB();
|
||||
} else { // dataA无重定向
|
||||
fseek($this->fp, -1, SEEK_CUR); // 文件指针回退1字节
|
||||
$data['A'] = $this->readString();
|
||||
$data['B'] = $this->getDataB();
|
||||
}
|
||||
$data['A'] = iconv("GBK", "UTF-8", $data['A']); // GBK -> UTF-8
|
||||
$data['B'] = iconv("GBK", "UTF-8", $data['B']);
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function getDataB() { // 从fp指定偏移获取dataB
|
||||
$flag = ord(fread($this->fp, 1));
|
||||
if ($flag == 0) { // dataB无信息
|
||||
return '';
|
||||
} else if ($flag == 1 || $flag == 2) { // dataB重定向
|
||||
fseek($this->fp, $this->read3byte());
|
||||
return $this->readString();
|
||||
} else { // dataB无重定向
|
||||
fseek($this->fp, -1, SEEK_CUR); // 文件指针回退1字节
|
||||
return $this->readString();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -35,17 +35,15 @@
|
||||
<?php endif; ?>
|
||||
<?php if($this->options->githuburl): ?>
|
||||
<a href="<?php $this->options->githuburl() ?>" target="_blank" aria-label="github">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M20.9992 5.95846C21.0087 6.565 20.9333 7.32649 20.8658 7.8807C20.8395 8.09686 20.8037 8.27676 20.7653 8.42453C21.6227 10.01 22 11.9174 22 14C22 16.4684 20.8127 18.501 18.9638 19.8871C17.1319 21.2605 14.6606 22 12 22C9.33939 22 6.86809 21.2605 5.0362 19.8871C3.18727 18.501 2 16.4684 2 14C2 11.9174 2.37732 10.01 3.23472 8.42452C3.19631 8.27676 3.16055 8.09685 3.13422 7.8807C3.06673 7.32649 2.99133 6.565 3.00081 5.95846C3.01149 5.27506 3.10082 4.5917 3.19988 3.91379C3.24569 3.60028 3.31843 3.30547 3.65883 3.11917C4.00655 2.92886 4.37274 2.99981 4.73398 3.1021C5.95247 3.44713 7.09487 3.93108 8.16803 4.51287C9.2995 4.17287 10.5783 4 12 4C13.4217 4 14.7005 4.17287 15.832 4.51287C16.9051 3.93108 18.0475 3.44713 19.266 3.1021C19.6273 2.99981 19.9935 2.92886 20.3412 3.11917C20.6816 3.30547 20.7543 3.60028 20.8001 3.91379C20.8992 4.5917 20.9885 5.27506 20.9992 5.95846ZM20 14C20 12.3128 19.6122 10 17.5 10C16.5478 10 15.6474 10.2502 14.7474 10.5004C13.8482 10.7502 12.9495 11 12 11C11.0505 11 10.1518 10.7502 9.25263 10.5004C8.35261 10.2502 7.45216 10 6.5 10C4.39379 10 4 12.3197 4 14C4 15.7636 4.82745 17.231 6.23588 18.2869C7.66135 19.3556 9.69005 20 12 20C14.3099 20 16.3386 19.3555 17.7641 18.2869C19.1726 17.231 20 15.7636 20 14ZM10 14.5C10 15.8807 9.32843 17 8.5 17C7.67157 17 7 15.8807 7 14.5C7 13.1193 7.67157 12 8.5 12C9.32843 12 10 13.1193 10 14.5ZM15.5 17C16.3284 17 17 15.8807 17 14.5C17 13.1193 16.3284 12 15.5 12C14.6716 12 14 13.1193 14 14.5C14 15.8807 14.6716 17 15.5 17Z"
|
||||
fill="#000000" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M5.88401 18.6533C5.58404 18.4526 5.32587 18.1975 5.0239 17.8369C4.91473 17.7065 4.47283 17.1524 4.55811 17.2583C4.09533 16.6833 3.80296 16.417 3.50156 16.3089C2.9817 16.1225 2.7114 15.5499 2.89784 15.0301C3.08428 14.5102 3.65685 14.2399 4.17672 14.4263C4.92936 14.6963 5.43847 15.1611 6.12425 16.0143C6.03025 15.8974 6.46364 16.441 6.55731 16.5529C6.74784 16.7804 6.88732 16.9182 6.99629 16.9911C7.20118 17.1283 7.58451 17.1874 8.14709 17.1311C8.17065 16.7489 8.24136 16.3783 8.34919 16.0358C5.38097 15.3104 3.70116 13.3952 3.70116 9.63971C3.70116 8.40085 4.0704 7.28393 4.75917 6.3478C4.5415 5.45392 4.57433 4.37284 5.06092 3.15636C5.1725 2.87739 5.40361 2.66338 5.69031 2.57352C5.77242 2.54973 5.81791 2.53915 5.89878 2.52673C6.70167 2.40343 7.83573 2.69705 9.31449 3.62336C10.181 3.41879 11.0885 3.315 12.0012 3.315C12.9129 3.315 13.8196 3.4186 14.6854 3.62277C16.1619 2.69 17.2986 2.39649 18.1072 2.52651C18.1919 2.54013 18.2645 2.55783 18.3249 2.57766C18.6059 2.66991 18.8316 2.88179 18.9414 3.15636C19.4279 4.37256 19.4608 5.45344 19.2433 6.3472C19.9342 7.28337 20.3012 8.39208 20.3012 9.63971C20.3012 13.3968 18.627 15.3048 15.6588 16.032C15.7837 16.447 15.8496 16.9105 15.8496 17.4121C15.8496 18.0765 15.8471 18.711 15.8424 19.4225C15.8412 19.6127 15.8397 19.8159 15.8375 20.1281C16.2129 20.2109 16.5229 20.5077 16.6031 20.9089C16.7114 21.4504 16.3602 21.9773 15.8186 22.0856C14.6794 22.3134 13.8353 21.5538 13.8353 20.5611C13.8353 20.4708 13.836 20.3417 13.8375 20.1145C13.8398 19.8015 13.8412 19.599 13.8425 19.4094C13.8471 18.7019 13.8496 18.0716 13.8496 17.4121C13.8496 16.7148 13.6664 16.2602 13.4237 16.051C12.7627 15.4812 13.0977 14.3973 13.965 14.2999C16.9314 13.9666 18.3012 12.8177 18.3012 9.63971C18.3012 8.68508 17.9893 7.89571 17.3881 7.23559C17.1301 6.95233 17.0567 6.54659 17.199 6.19087C17.3647 5.77663 17.4354 5.23384 17.2941 4.57702L17.2847 4.57968C16.7928 4.71886 16.1744 5.0198 15.4261 5.5285C15.182 5.69438 14.8772 5.74401 14.5932 5.66413C13.7729 5.43343 12.8913 5.315 12.0012 5.315C11.111 5.315 10.2294 5.43343 9.40916 5.66413C9.12662 5.74359 8.82344 5.69492 8.57997 5.53101C7.8274 5.02439 7.2056 4.72379 6.71079 4.58376C6.56735 5.23696 6.63814 5.77782 6.80336 6.19087C6.94565 6.54659 6.87219 6.95233 6.61423 7.23559C6.01715 7.8912 5.70116 8.69376 5.70116 9.63971C5.70116 12.8116 7.07225 13.9683 10.023 14.2999C10.8883 14.3971 11.2246 15.4769 10.5675 16.0482C10.3751 16.2156 10.1384 16.7802 10.1384 17.4121V20.5611C10.1384 21.5474 9.30356 22.2869 8.17878 22.09C7.63476 21.9948 7.27093 21.4766 7.36613 20.9326C7.43827 20.5204 7.75331 20.2116 8.13841 20.1276V19.1381C7.22829 19.1994 6.47656 19.0498 5.88401 18.6533Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if($this->options->mastodonurl): ?>
|
||||
<a href="<?php $this->options->mastodonurl() ?>" target="_blank" aria-label="Mastodon">
|
||||
<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>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M3.019 12.0075C2.98744 10.7478 3.00692 9.5598 3.00692 8.56644C3.00692 4.22767 5.84954 2.95597 5.84954 2.95597C7.28286 2.29767 9.74238 2.0209 12.2993 2H12.3621C14.919 2.0209 17.3801 2.29767 18.8134 2.95597C18.8134 2.95597 21.656 4.22767 21.656 8.56644C21.656 8.56644 21.6916 11.7674 21.2596 13.9898C20.9852 15.4007 18.8034 16.9446 16.2974 17.2438C14.9906 17.3999 13.7042 17.5431 12.3322 17.4802C10.0885 17.3775 8.31815 16.9446 8.31815 16.9446C8.31815 17.1631 8.33166 17.3711 8.35853 17.5655C8.44182 18.1978 8.65659 18.6604 8.96296 19C9.72944 19.8497 11.0692 19.9301 12.3577 19.9743C14.178 20.0366 15.7986 19.5254 15.7986 19.5254L15.8735 21.1712C15.8735 21.1712 14.6003 21.8548 12.3322 21.9805C11.0815 22.0493 9.52858 21.9491 7.71969 21.4704C6.18802 21.065 5.15153 20.1804 4.45091 19C3.35714 17.1573 3.08191 14.5938 3.019 12.0075ZM6.31815 16.9446V14.3967L8.79316 15.0018C8.8405 15.0134 8.95098 15.0383 9.11692 15.0723C9.40521 15.1313 9.73416 15.1908 10.0959 15.2467C10.8485 15.3628 11.6341 15.4462 12.4237 15.4823C13.4425 15.529 14.3249 15.4652 16.0603 15.2579C17.7233 15.0594 19.208 14.0622 19.2963 13.6082C19.3783 13.1861 19.4472 12.6858 19.5021 12.1261C19.5714 11.4205 19.6155 10.6558 19.6388 9.88068C19.654 9.37026 19.6582 8.93648 19.6564 8.62452L19.656 8.56644C19.656 7.1368 19.2873 6.12756 18.6928 5.40793C18.5008 5.17553 18.3004 4.99408 18.1087 4.85958C18.0183 4.79617 17.9737 4.77136 17.9787 4.77345C16.9662 4.30844 14.8859 4.02069 12.3621 3.99993H12.3156C9.77596 4.02069 7.6969 4.30836 6.66627 4.78161C6.68919 4.77136 6.64459 4.79617 6.55423 4.85958C6.36257 4.99408 6.16214 5.17553 5.97016 5.40793C5.37568 6.12756 5.00692 7.1368 5.00692 8.56644C5.00692 8.7976 5.00628 8.96339 5.00392 9.44137C4.9981 10.6238 5.00004 11.2256 5.01841 11.9589C5.07185 14.156 5.2822 15.7941 5.71797 17C5.93023 17.5874 6.19005 18.0709 6.49741 18.4507C6.37791 18.0162 6.31815 17.5142 6.31815 16.9446ZM8.08576 6.37135C8.71735 6.37135 9.22924 6.88324 9.22924 7.51482C9.22924 8.14626 8.71735 8.6583 8.08576 8.6583C7.45432 8.6583 6.94229 8.14626 6.94229 7.51482C6.94229 6.88324 7.45432 6.37135 8.08576 6.37135Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user