😗修复星港提出的主页js出现错误的问题
This commit is contained in:
parent
421c3f53c8
commit
55a4358cc1
16
index.html
16
index.html
@ -6,18 +6,26 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>文章卡片展示</title>
|
<title>文章卡片展示</title>
|
||||||
</head>
|
</head>
|
||||||
|
<style>
|
||||||
|
.root-container {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="friend-circle-lite-root"></div>
|
<div class="root-container" style="max-width: 1000px;">
|
||||||
|
<div id="friend-circle-lite-root"></div>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
if (typeof UserConfig === 'undefined') {
|
if (typeof UserConfig === 'undefined') {
|
||||||
var UserConfig = {
|
var UserConfig = {
|
||||||
// 填写你的fc Lite地址
|
// 填写你的fc Lite地址
|
||||||
private_api_url: 'https://fc.liushen.fun/',
|
private_api_url: './',
|
||||||
// 点击加载更多时,一次最多加载几篇文章,默认20
|
// 点击加载更多时,一次最多加载几篇文章,默认20
|
||||||
page_turning_number: 20,
|
page_turning_number: 24,
|
||||||
// 头像加载失败时,默认头像地址
|
// 头像加载失败时,默认头像地址
|
||||||
error_img: 'https://pic.imgdb.cn/item/6695daa4d9c307b7e953ee3d.jpg', // https://cdn.qyliu.top/i/2024/03/22/65fcea97b3ca6.png
|
error_img: 'https://i.p-i.vip/30/20240815-66bced9226a36.webp', // https://pic.imgdb.cn/item/6695daa4d9c307b7e953ee3d.jpg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -62,6 +62,7 @@ body {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border:1px solid var(--border-color);
|
border:1px solid var(--border-color);
|
||||||
height: 210px;
|
height: 210px;
|
||||||
|
transition: border 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.random-container {
|
.random-container {
|
||||||
@ -245,7 +246,8 @@ body {
|
|||||||
transition: border 0.3s;
|
transition: border 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover {
|
.card:hover,
|
||||||
|
#random-article:hover {
|
||||||
border: 1px solid var(--hover-color);
|
border: 1px solid var(--hover-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ function initialize_fc_lite() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch(`${UserConfig.private_api_url}all`)
|
fetch(`${UserConfig.private_api_url}all.json`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
localStorage.setItem(cacheKey, JSON.stringify(data));
|
localStorage.setItem(cacheKey, JSON.stringify(data));
|
||||||
@ -217,5 +217,5 @@ function whenDOMReady() {
|
|||||||
initialize_fc_lite();
|
initialize_fc_lite();
|
||||||
}
|
}
|
||||||
|
|
||||||
whenDOMReady()
|
whenDOMReady();
|
||||||
document.addEventListener("pjax:complete", whenDOMReady)
|
document.addEventListener("pjax:complete", whenDOMReady);
|
2
main/fclite.min.css
vendored
2
main/fclite.min.css
vendored
File diff suppressed because one or more lines are too long
2
main/fclite.min.js
vendored
2
main/fclite.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user