添加配置文件

This commit is contained in:
底层用户 2022-06-28 17:27:23 +08:00
parent 2604d143e6
commit 4b570d3f98
15 changed files with 193 additions and 59 deletions

View File

@ -180,7 +180,7 @@ main {
transform: translateY(-8%); transform: translateY(-8%);
} }
span.img-title { .img-title-big {
font-size: 5rem; font-size: 5rem;
font-family: 'Pacifico-Regular' !important; font-family: 'Pacifico-Regular' !important;
} }
@ -210,7 +210,7 @@ span.img-text {
.des-title { .des-title {
margin: 1rem 1rem; margin: 1rem 1rem;
line-height: 2rem; line-height: 2rem;
/*font-size: 1.10rem;*/ margin-right: auto;
} }
span#change { span#change {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -67,7 +67,7 @@
<div class="inner three"></div> <div class="inner three"></div>
</div> </div>
<div class="loading-word"> <div class="loading-word">
<p class="loading-title">無名の主页</p> <p class="loading-title" id="loading-title">無名の主页</p>
<span id="loading-text">加载中</span> <span id="loading-text">加载中</span>
</div> </div>
</div> </div>
@ -87,10 +87,10 @@
<div class="main-left"> <div class="main-left">
<!--Logo--> <!--Logo-->
<div class="main-img"> <div class="main-img">
<img src="./img/icon/logo.png" alt="img"> <img id="logo-img" src="./img/icon/logo.png" alt="img">
<div class="img-title"> <div class="img-title">
<span class="img-title">imsyy</span> <span class="img-title-big" id="logo-text-1">imsyy</span>
<span class="img-text">.top</span> <span class="img-text" id="logo-text-2">.top</span>
</div> </div>
</div> </div>
<!--介绍信息--> <!--介绍信息-->
@ -108,7 +108,7 @@
target="_blank"> target="_blank">
<i class="fa-brands fa-github"></i> <i class="fa-brands fa-github"></i>
</a> </a>
<a href="http://wpa.qq.com/msgrd?v=3&uin=1539250352&site=qq&menu=yes" class="link" <a href="https://wpa.qq.com/msgrd?v=3&uin=1539250352&site=qq&menu=yes" class="link"
id="qq" target="_blank"> id="qq" target="_blank">
<i class="fa-brands fa-qq"></i> <i class="fa-brands fa-qq"></i>
</a> </a>
@ -127,7 +127,7 @@
</div> </div>
<!--第二屏 Logo--> <!--第二屏 Logo-->
<div class="logo cards" style="display: none" id="changemore"> <div class="logo cards" style="display: none" id="changemore">
<a class="logo-text">imsyy.top</a> <a class="logo-text" id="logo-text-small">imsyy.top</a>
</div> </div>
<div class="col right"> <div class="col right">
<div class="main-right"> <div class="main-right">
@ -205,26 +205,26 @@
<!--第一组--> <!--第一组-->
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<a href="https://blog.imsyy.top/" target="_blank"> <a id="link-url-1" href="https://blog.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-blog"></i> <i id="link-icon-1" class="fa-solid fa-blog"></i>
<span class="link-name">博客</span> <span class="link-name" id="link-name-1">博客</span>
</div> </div>
</a> </a>
</div> </div>
<div class="col 2"> <div class="col 2">
<a href="https://drive.imsyy.top/" target="_blank"> <a id="link-url-2" href="https://drive.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-cloud"></i> <i id="link-icon-2" class="fa-solid fa-cloud"></i>
<span class="link-name">网盘</span> <span class="link-name" id="link-name-2">网盘</span>
</div> </div>
</a> </a>
</div> </div>
<div class="col"> <div class="col">
<a href="https://music.imsyy.top/" target="_blank"> <a id="link-url-3" href="https://music.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-music"></i> <i id="link-icon-3" class="fa-solid fa-music"></i>
<span class="link-name">音乐</span> <span class="link-name" id="link-name-3">音乐</span>
</div> </div>
</a> </a>
</div> </div>
@ -232,26 +232,26 @@
<!--第二组--> <!--第二组-->
<div class="row" style="margin-top: 1.5rem;"> <div class="row" style="margin-top: 1.5rem;">
<div class="col"> <div class="col">
<a href="https://nav.imsyy.top/" target="_blank"> <a id="link-url-4" href="https://nav.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-compass"></i> <i id="link-icon-4" class="fa-solid fa-compass"></i>
<span class="link-name">起始页</span> <span class="link-name" id="link-name-4">起始页</span>
</div> </div>
</a> </a>
</div> </div>
<div class="col 2"> <div class="col 2">
<a href="https://web.imsyy.top/" target="_blank"> <a id="link-url-5" href="https://web.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-book-bookmark"></i> <i id="link-icon-5" class="fa-solid fa-book-bookmark"></i>
<span class="link-name">网址集</span> <span class="link-name" id="link-name-5">网址集</span>
</div> </div>
</a> </a>
</div> </div>
<div class="col"> <div class="col">
<a href="https://lab.imsyy.top/" target="_blank"> <a id="link-url-6" href="https://lab.imsyy.top/" target="_blank">
<div class="link-card cards"> <div class="link-card cards">
<i class="fa-solid fa-flask"></i> <i id="link-icon-6" class="fa-solid fa-flask"></i>
<span class="link-name">实验室</span> <span class="link-name" id="link-name-6">实验室</span>
</div> </div>
</a> </a>
</div> </div>
@ -366,9 +366,9 @@
<!--左侧内容--> <!--左侧内容-->
<div class="box-left"> <div class="box-left">
<div class="img-title"> <div class="img-title">
<span class="img-title">imsyy</span> <span class="img-title-big" id="logo-title-other">imsyy</span>
<span class="img-text">.top</span><br /> <span class="img-text" id="logo-title-other-small">.top</span><br />
<span class="img-text">&nbsp;&nbsp;v&nbsp;3.0</span> <span class="img-text">&nbsp;v&nbsp;3.0</span>
<a href="https://github.com/imsyy/home" target="_blank"> <a href="https://github.com/imsyy/home" target="_blank">
<i class="fa-brands fa-github"></i> <i class="fa-brands fa-github"></i>
</a> </a>
@ -396,17 +396,17 @@
<div class="form-radio"> <div class="form-radio">
<input type="radio" class="set-wallpaper" style="display: none;" <input type="radio" class="set-wallpaper" style="display: none;"
id="radio2" value="2" name="wallpaper-type"> id="radio2" value="2" name="wallpaper-type">
<label for="radio2">每日一图</label> <label for="radio2" id="wallpaper_text1">每日一图</label>
</div> </div>
<div class="form-radio"> <div class="form-radio">
<input type="radio" class="set-wallpaper" style="display: none;" <input type="radio" class="set-wallpaper" style="display: none;"
id="radio3" value="3" name="wallpaper-type"> id="radio3" value="3" name="wallpaper-type">
<label for="radio3">随机风景</label> <label for="radio3" id="wallpaper_text2">随机风景</label>
</div> </div>
<div class="form-radio"> <div class="form-radio">
<input type="radio" class="set-wallpaper" style="display: none;" <input type="radio" class="set-wallpaper" style="display: none;"
id="radio4" value="4" name="wallpaper-type"> id="radio4" value="4" name="wallpaper-type">
<label for="radio4">随机动漫</label> <label for="radio4" id="wallpaper_text3">随机动漫</label>
</div> </div>
</div> </div>
</div> </div>
@ -454,7 +454,9 @@
</div> </div>
<!--Aplayer--> <!--Aplayer-->
<div class="box-right"> <div class="box-right">
<div id="aplayer"></div> <div id="aplayer">
<span>音乐播放器加载失败</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -462,10 +464,10 @@
</main> </main>
<!-- 版权信息 --> <!-- 版权信息 -->
<footer id="footer" class="fixed-bottom footer"> <footer id="footer" class="fixed-bottom footer">
<div class="power">Copyright&nbsp;&copy;&nbsp;2020 <div class="power">Copyright&nbsp;&copy;&nbsp;<span id="power-year">2020</span>
<script> <script>
document.write(' - ' + (new Date()).getFullYear()) document.write(' - ' + (new Date()).getFullYear())
</script>&nbsp;<a href="https://imsyy.top">無名</a>&nbsp;&amp;&nbsp; </script>&nbsp;<a href="https://imsyy.top" id="power-text">無名</a>&nbsp;&amp;&nbsp;
<!-- 以下信息请不要修改哦 --> <!-- 以下信息请不要修改哦 -->
Made&nbsp;by&nbsp;<a href="https://github.com/imsyy/home" target="_blank">imsyy</a> Made&nbsp;by&nbsp;<a href="https://github.com/imsyy/home" target="_blank">imsyy</a>
</div> </div>
@ -487,9 +489,9 @@
</noscript> </noscript>
<!-- JS --> <!-- JS -->
<script type="text/javascript" src="./js/main.js"></script> <script type="text/javascript" src="./js/main.js"></script>
<script type="text/javascript" src="./js/set.js"></script>
<script type="text/javascript" src="./js/time.js"></script> <script type="text/javascript" src="./js/time.js"></script>
<script type="text/javascript" src="./js/js.cookie.js"></script> <script type="text/javascript" src="./js/js.cookie.js"></script>
<script type="text/javascript" src="./js/set.js"></script>
<script type="text/javascript" src="./js/cursor.js"></script> <script type="text/javascript" src="./js/cursor.js"></script>
<script type="text/javascript" <script type="text/javascript"
src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/bootstrap/5.1.0/js/bootstrap.min.js"> src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/bootstrap/5.1.0/js/bootstrap.min.js">

View File

@ -133,7 +133,7 @@ $('#hitokoto').click(function () {
//获取天气 //获取天气
//每日限量 100 次 //每日限量 100 次
//请前往 https://www.tianqiapi.com/ 申请(免费) //请前往 https://www.tianqiapi.com/ 申请(免费)
fetch('https://www.yiketianqi.com/free/day?appid=43656176&appsecret=I42og6Lm&unescape=1') fetch(localStorage.getItem('weather_api'))
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
$('#wea_text').html(data.wea) $('#wea_text').html(data.wea)
@ -169,7 +169,6 @@ function time() {
if (s < 10) { if (s < 10) {
s = "0" + s; s = "0" + s;
} }
//document.getElementById("time").innerHTML = y + "&nbsp;年&nbsp;" + mm + "&nbsp;月&nbsp;" + d + "&nbsp;日&nbsp;" + "<span class='weekday'>" + weekday[day] + "</span><br>" + "<span class='time-text'>" + h + ":" + m + ":" + s + "</span>";
$("#time").html(y + "&nbsp;年&nbsp;" + mm + "&nbsp;月&nbsp;" + d + "&nbsp;日&nbsp;" + "<span class='weekday'>" + weekday[day] + "</span><br>" + "<span class='time-text'>" + h + ":" + m + ":" + s + "</span>"); $("#time").html(y + "&nbsp;年&nbsp;" + mm + "&nbsp;月&nbsp;" + d + "&nbsp;日&nbsp;" + "<span class='weekday'>" + weekday[day] + "</span><br>" + "<span class='time-text'>" + h + ":" + m + ":" + s + "</span>");
t = setTimeout(time, 1000); t = setTimeout(time, 1000);
} }
@ -227,12 +226,12 @@ $('#switchmore').on('click', function () {
shoemore = !shoemore; shoemore = !shoemore;
if (shoemore && $(document).width() >= 990) { if (shoemore && $(document).width() >= 990) {
$('#container').attr('class', 'container mores'); $('#container').attr('class', 'container mores');
$("#change").html("Oops&nbsp;!"); $("#change").html(localStorage.getItem('des_tip_change'));
$("#change1").html("哎呀,这都被你发现了( 再点击一次可关闭 "); $("#change1").html(localStorage.getItem('des_title_change'));
} else { } else {
$('#container').attr('class', 'container'); $('#container').attr('class', 'container');
$("#change").html("Hello&nbsp;World&nbsp;!"); $("#change").html(localStorage.getItem('des_tip'));
$("#change1").html("一个建立于 21 世纪的小站,存活于互联网的边缘"); $("#change1").html(localStorage.getItem('des_title'));
} }
}); });
@ -280,8 +279,8 @@ window.addEventListener('load', function () {
if (window.innerWidth <= 990) { if (window.innerWidth <= 990) {
//移动端隐藏更多页面 //移动端隐藏更多页面
$('#container').attr('class', 'container'); $('#container').attr('class', 'container');
$("#change").html("Hello&nbsp;World&nbsp;!"); $("#change").html(localStorage.getItem('des_tip'));
$("#change1").html("一个建立于 21 世纪的小站,存活于互联网的边缘"); $("#change1").html(localStorage.getItem('des_title'));
//移动端隐藏弹窗页面 //移动端隐藏弹窗页面
$('#box').css("display", "none"); $('#box').css("display", "none");
@ -366,8 +365,8 @@ var title2 = `
|_____|_| |_|_____/ |_| |_| |_____|_| |_|_____/ |_| |_|
` `
var content = ` var content = `
3.0 3.2
更新日期2022-05-20 更新日期2022-06-28
主页: https://www.imsyy.top 主页: https://www.imsyy.top
Github: https://github.com/imsyy/home Github: https://github.com/imsyy/home

View File

@ -5,6 +5,71 @@ GitHubhttps://github.com/imsyy/home
版权所有请勿删除 版权所有请勿删除
*/ */
$(function () {
var url = "../setting.json"
$.getJSON(
url,
function (data) {
/* 页头数据 */
$('title').text(data.title);
$('#loading-title').html(data.title);
$("meta[name='description']").attr('content', data.description);
$("meta[name='keywords']").attr('content', data.keywords);
$("meta[name='author']").attr('content', data.author);
/* 基础信息 */
$("#logo-img").attr("src", data.logo_img);
$('#logo-text-1').html(data.logo_text_1);
$('#logo-text-2').html("." + data.logo_text_2);
$('#logo-title-other').html(data.logo_text_1);
$('#logo-title-other-small').html("." + data.logo_text_2);
$('#logo-text-small').html(data.logo_text_1 + "." + data.logo_text_2);
$('#change').html(data.des_title[0]);
$('#change1').html(data.des_title[1]);
localStorage.setItem('des_tip', data.des_title[0]);
localStorage.setItem('des_tip_change', data.des_title_change[0]);
localStorage.setItem('des_title', data.des_title[1]);
localStorage.setItem('des_title_change', data.des_title_change[1]);
/* 社交链接 */
$('#github').attr('href', "https://github.com/" + data.github);
$('#qq').attr('href', "https://wpa.qq.com/msgrd?v=3&uin=" + data.qq + "&site=qq&menu=yes");
$('#email').attr('href', "mailto:" + data.email);
$('#telegram').attr('href', "https://t.me/" + data.telegram);
$('#twitter').attr('href', "https://twitter.com/" + data.twitter);
/* 天气 API */
localStorage.setItem('weather_api', data.weather_api);
/* 快捷链接 */
$('#link-url-1').attr('href', data.link_1[0]);
$('#link-icon-1').attr('class', data.link_1[1]);
$('#link-name-1').html(data.link_1[2]);
$('#link-url-2').attr('href', data.link_2[0]);
$('#link-icon-2').attr('class', data.link_2[1]);
$('#link-name-2').html(data.link_2[2]);
$('#link-url-3').attr('href', data.link_3[0]);
$('#link-icon-3').attr('class', data.link_3[1]);
$('#link-name-3').html(data.link_3[2]);
$('#link-url-4').attr('href', data.link_4[0]);
$('#link-icon-4').attr('class', data.link_4[1]);
$('#link-name-4').html(data.link_4[2]);
$('#link-url-5').attr('href', data.link_5[0]);
$('#link-icon-5').attr('class', data.link_5[1]);
$('#link-name-5').html(data.link_5[2]);
$('#link-url-6').attr('href', data.link_6[0]);
$('#link-icon-6').attr('class', data.link_6[1]);
$('#link-name-6').html(data.link_6[2]);
//壁纸 API
$('#wallpaper_text1').html(data.wallpaper_api[0][0]);
localStorage.setItem('wallpaper_api_1', data.wallpaper_api[0][1]);
$('#wallpaper_text2').html(data.wallpaper_api[1][0]);
localStorage.setItem('wallpaper_api_2', data.wallpaper_api[1][1]);
$('#wallpaper_text3').html(data.wallpaper_api[2][0]);
localStorage.setItem('wallpaper_api_3', data.wallpaper_api[2][1]);
//页脚版权
$('#power-year').html(data.Copyright_year);
$('#power-text').html(data.Copyright_text);
}
)
});
// 背景图片 Cookies // 背景图片 Cookies
function setBgImg(bg_img) { function setBgImg(bg_img) {
if (bg_img) { if (bg_img) {
@ -14,7 +79,7 @@ function setBgImg(bg_img) {
return true; return true;
} }
return false; return false;
} };
// 获取背景图片 Cookies // 获取背景图片 Cookies
function getBgImg() { function getBgImg() {
@ -29,7 +94,6 @@ function getBgImg() {
var bg_img_preinstall = { var bg_img_preinstall = {
"type": "1", // 1:默认背景 2:每日一图 3:随机风景 4:随机动漫 "type": "1", // 1:默认背景 2:每日一图 3:随机风景 4:随机动漫
"path": "", //自定义图片
}; };
@ -55,16 +119,16 @@ function setBgImgInit() {
$('#bg').attr('src', pictures[rd]) //随机默认壁纸 $('#bg').attr('src', pictures[rd]) //随机默认壁纸
break; break;
case "2": case "2":
$('#bg').attr('src', 'https://api.dujin.org/bing/1920.php'); //必应每日 $('#bg').attr('src', localStorage.getItem('wallpaper_api_1')); //必应每日
break; break;
case "3": case "3":
$('#bg').attr('src', 'https://api.ixiaowai.cn/gqapi/gqapi.php'); //随机风景 $('#bg').attr('src', localStorage.getItem('wallpaper_api_2')); //随机风景
break; break;
case "4": case "4":
$('#bg').attr('src', 'https://api.ixiaowai.cn/api/api.php'); //随机动漫 $('#bg').attr('src', localStorage.getItem('wallpaper_api_3')); //随机动漫
break; break;
} }
} };
$(document).ready(function () { $(document).ready(function () {
// 壁纸数据加载 // 壁纸数据加载
@ -95,36 +159,36 @@ $(document).ready(function () {
timeout: 2500, timeout: 2500,
message: '壁纸设置成功', message: '壁纸设置成功',
}); });
} };
if (type === "2") { if (type === "2") {
setBgImg(bg_img); setBgImg(bg_img);
$('#bg').attr('src', 'https://api.dujin.org/bing/1920.php'); //必应每日 $('#bg').attr('src', localStorage.getItem('wallpaper_api_1')); //必应每日
iziToast.show({ iziToast.show({
icon: "fa-solid fa-image", icon: "fa-solid fa-image",
timeout: 2500, timeout: 2500,
message: '壁纸设置成功', message: '壁纸设置成功',
}); });
} };
if (type === "3") { if (type === "3") {
setBgImg(bg_img); setBgImg(bg_img);
$('#bg').attr('src', 'https://api.ixiaowai.cn/gqapi/gqapi.php'); //随机风景 $('#bg').attr('src', localStorage.getItem('wallpaper_api_2')); //随机风景
iziToast.show({ iziToast.show({
icon: "fa-solid fa-image", icon: "fa-solid fa-image",
timeout: 2500, timeout: 2500,
message: '壁纸设置成功', message: '壁纸设置成功',
}); });
} };
if (type === "4") { if (type === "4") {
setBgImg(bg_img); setBgImg(bg_img);
$('#bg').attr('src', 'https://api.ixiaowai.cn/api/api.php'); //随机动漫 $('#bg').attr('src', localStorage.getItem('wallpaper_api_3')); //随机动漫
iziToast.show({ iziToast.show({
icon: "fa-solid fa-image", icon: "fa-solid fa-image",
timeout: 2500, timeout: 2500,
message: '壁纸设置成功', message: '壁纸设置成功',
}); });
} };
}); });
}); });

69
setting.json Normal file
View File

@ -0,0 +1,69 @@
{
"title": "無名の主页",
"description": "一个默默无闻的主页",
"keywords": "無名,个人主页",
"author": "無名",
"logo_img": "./img/icon/logo.png",
"logo_text_1": "imsyy",
"logo_text_2": "top",
"des_title": [
"Hello World !",
"一个建立于 21 世纪的小站,存活于互联网的边缘"
],
"des_title_change": [
"Oops !",
"哎呀,这都被你发现了 ( 再点击一次可关闭 )"
],
"github": "imsyy",
"qq": "1539250352",
"email": "one@imsyy.top",
"telegram": "bottom_user",
"twitter": "iimmsyy",
"weather_api": "https://www.yiketianqi.com/free/day?appid=43656176&appsecret=I42og6Lm&unescape=1",
"link_1": [
"https://blog.imsyy.top/",
"fa-solid fa-blog",
"博客"
],
"link_2": [
"https://drive.imsyy.top/",
"fa-solid fa-cloud",
"网盘"
],
"link_3": [
"https://blog.imsyy.top/",
"fa-solid fa-music",
"音乐"
],
"link_4": [
"https://nav.imsyy.top/",
"fa-solid fa-compass",
"起始页"
],
"link_5": [
"https://web.imsyy.top/",
"fa-solid fa-book-bookmark",
"网址集"
],
"link_6": [
"https://lab.imsyy.top/",
"fa-solid fa-flask",
"实验室"
],
"wallpaper_api": [
[
"每日一图",
"https://api.dujin.org/bing/1920.php"
],
[
"随机风景",
"https://api.ixiaowai.cn/gqapi/gqapi.php"
],
[
"随机动漫",
"https://api.ixiaowai.cn/api/api.php"
]
],
"Copyright_year": "2020",
"Copyright_text": "無名"
}