Change iconfont to FontAwesome

This commit is contained in:
底层用户 2022-05-24 14:30:14 +08:00
parent 9c141815f5
commit 042231c094
6 changed files with 131 additions and 83 deletions

View File

@ -13,7 +13,7 @@
src: url('https://file.imsyy.top/font/MiSans-Regular.woff') format('woff');
font-display: sans-serif;
}
/*
@font-face {
font-family: "iconfont";
src: url('../font/iconfont.woff2') format('woff2'),
@ -175,4 +175,4 @@
.icon-yinhao-copy-copy:before {
content: "\e62e";
}
} */

View File

@ -191,7 +191,7 @@ span#change {
font-family: 'Pacifico-Regular' !important;
}
i.iconfont.icon-yinhao-copy {
.fa-solid.fa-quote-right {
align-self: flex-end;
}
@ -201,11 +201,12 @@ i.iconfont.icon-yinhao-copy {
display: flex;
align-items: center;
max-width: 460px;
height: 42px;
}
.link i {
font-size: 1.75rem;
margin: 0px 10px;
font-size: 1.45rem;
margin: 2px 12px;
}
/*
@ -213,6 +214,7 @@ i.iconfont.icon-yinhao-copy {
font-size: 2.5rem;
}
*/
#link-text {
display: none;
flex: 1;
@ -265,6 +267,7 @@ i.iconfont.icon-yinhao-copy {
.open-music {
display: none;
align-items: center;
justify-content: center;
background: rgb(0 0 0 / 15%);
padding: 4px 0px;
@ -330,23 +333,42 @@ i.iconfont.icon-yinhao-copy {
align-items: center;
}
i.iconfont.icon-play,
i.iconfont.icon-pause {
.fa-solid.fa-play,
.fa-solid.fa-pause {
padding: 4px;
font-size: 2.25rem;
padding: 6px;
border-radius: 6px;
}
i.iconfont.icon-play:hover,
i.iconfont.icon-pause:hover {
#play {
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6px;
padding: 6px 10px;
}
#play:hover {
background: rgb(255 255 255 / 20%);
padding: 6px;
border-radius: 6px;
}
i#last,
i#next {
font-size: 2.0rem;
#last,
#next {
font-size: 1.75rem;
border-radius: 6px;
padding: 6px 10px;
}
#last:hover,
#next:hover {
background: rgb(255 255 255 / 20%);
}
#play:active,
#last:active,
#next:active {
transform: scale(0.95);
}
.music-text {
@ -392,12 +414,12 @@ i#next {
}
#volume-ico {
padding-top: 1px;
margin-right: 6px;
padding-top: 2px;
margin-right: 10px;
}
.music-volume i {
font-size: 1.75rem;
font-size: 1.25rem;
}
input[type=range] {
@ -488,7 +510,7 @@ i.iconfont.icon-link {
.link-card i {
margin-left: 0px;
font-size: 2.2rem;
font-size: 1.65rem;
}
.link-card:hover {
@ -678,6 +700,7 @@ i.iconfont.icon-z_shangpinheji {
left: auto;
top: 10px;
right: 16px;
font-size: 1.5rem;
}
.closebox:hover {
@ -932,6 +955,11 @@ footer {
align-items: center;
}
.iziToast>.iziToast-body i {
margin-left: 6px;
margin-top: 10px;
}
.iziToast-message {
word-break: break-all !important;
}

View File

@ -36,6 +36,10 @@
<script type="text/javascript"
src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/izitoast/1.4.0/js/iziToast.min.js">
</script>
<!-- FontAwesome -->
<link rel="stylesheet"
href="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f2eac667-5d8e-404a-aa05-70088e3eebfd/fb74713f-7e1d-40d6-8b25-2171a185b8b3.css"
media="all">
<!-- Aplayer -->
<link rel="stylesheet" href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/aplayer/1.10.1/APlayer.min.css"
crossorigin="anonymous" referrerpolicy="no-referrer" />
@ -91,29 +95,31 @@
</div>
<!--介绍信息-->
<div class="message cards" id="switchmore">
<div class="des" id="des"><i class="iconfont icon-yinhao-copy-copy"></i>
<div class="des" id="des">
<i class="fa-solid fa-quote-left"></i>
<div class="des-title"><span id="change">Hello&nbsp;World&nbsp;!</span><br /><span
id="change1">一个建立于 21 世纪的小站,存活于互联网的边缘</span></div>
<i class="iconfont icon-yinhao-copy"></i>
<i class="fa-solid fa-quote-right"></i>
</div>
</div>
<!--社交链接-->
<div class="social" id="social">
<a href="https://github.com/imsyy" class="link" id="github" target="_blank">
<i class="iconfont icon-github"></i>
<a href="https://github.com/imsyy" class="link" id="github" style="margin-left: 4px"
target="_blank">
<i class="fa-brands fa-github"></i>
</a>
<a href="http://wpa.qq.com/msgrd?v=3&uin=1539250352&site=qq&menu=yes" class="link"
id="qq" target="_blank">
<i class="iconfont icon-QQ"></i>
<i class="fa-brands fa-qq"></i>
</a>
<a href="mailto:one@imsyy.top" class="link" id="email">
<i class="iconfont icon-youxiang"></i>
<i class="fa-solid fa-envelope"></i>
</a>
<a href="https://t.me/bottom_user" class="link" id="telegram" target="_blank">
<i class="iconfont icon-telegram"></i>
<i class="fa-brands fa-telegram"></i>
</a>
<a href="https://twitter.com/iimmsyy" class="link" id="twitter" target="_blank">
<i class="iconfont icon-twitter"></i>
<i class="fa-brands fa-twitter"></i>
</a>
<a id="link-text">通过这里联系我</a>
</div>
@ -132,7 +138,7 @@
<div class="hitokoto cards" id="hitokoto">
<!--切换音乐-->
<div class="open-music fixed-top" id="open-music">
<i class="iconfont icon-music"></i>
<i class="fa-solid fa-music-note"></i>
<span>&nbsp;打开音乐播放器</span>
</div>
<!--切换音乐结束-->
@ -144,18 +150,18 @@
</div>
</div>
<!--音乐-->
<div class="music cards" id="music">
<div class="music" id="music">
<div class="music-all">
<div class="music-button">
<div id="music-open">音乐列表</div>
<div id="music-close">回到一言</div>
</div>
<div class="music-control">
<i class="iconfont icon-next-one-copy" id="last"></i>
<i class="fa-solid fa-backward-step" id="last"></i>
<div id="play">
<i class="iconfont icon-play"></i>
<i class="fa-solid fa-play"></i>
</div>
<i class="iconfont icon-next-one" id="next"></i>
<i class="fa-solid fa-forward-step" id="next"></i>
</div>
<div class="music-menu">
<div class="music-text">
@ -163,7 +169,7 @@
</div>
<div class="music-volume" style="display: none;">
<div id="volume-ico">
<i class="iconfont icon-volume-1"></i>
<i class="fa-solid fa-volume"></i>
</div>
<input type="range" min="0" max="1" step="0.01" id="volume">
</div>
@ -191,7 +197,7 @@
</div>
<!--分隔线-->
<div class="line">
<i class="iconfont icon-link"></i>
<i class="fa-solid fa-link"></i>
<span class="line-text">网站列表</span>
</div>
<!--网站链接-->
@ -201,7 +207,7 @@
<div class="col">
<a href="https://blog.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-blog-solid"></i>
<i class="fa-solid fa-blog"></i>
<span class="link-name">博客</span>
</div>
</a>
@ -209,7 +215,7 @@
<div class="col 2">
<a href="https://drive.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-cloud"></i>
<i class="fa-solid fa-cloud"></i>
<span class="link-name">网盘</span>
</div>
</a>
@ -217,7 +223,7 @@
<div class="col">
<a href="https://music.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-music-list"></i>
<i class="fa-solid fa-list-music"></i>
<span class="link-name">音乐</span>
</div>
</a>
@ -228,7 +234,7 @@
<div class="col">
<a href="https://nav.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-a-daohangzhiyindingwei-05"></i>
<i class="fa-solid fa-compass"></i>
<span class="link-name">起始页</span>
</div>
</a>
@ -236,7 +242,7 @@
<div class="col 2">
<a href="https://web.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-z_shangpinheji"></i>
<i class="fa-solid fa-book-bookmark"></i>
<span class="link-name">网址集</span>
</div>
</a>
@ -244,7 +250,7 @@
<div class="col">
<a href="https://lab.imsyy.top/" target="_blank">
<div class="link-card cards">
<i class="iconfont icon-lab"></i>
<i class="fa-solid fa-flask"></i>
<span class="link-name">实验室</span>
</div>
</a>
@ -256,18 +262,20 @@
</div>
<!--开菜单按钮-->
<div class="menu" id="switchmenu">
<a class="munu-button cards" id="menu"><i class="iconfont icon-bars"></i></a>
<a class="munu-button cards" id="menu">
<i class="fa-solid fa-bars"></i>
</a>
</div>
<!--更多内容-->
<div class="more" id="more">
<!--关闭按钮-->
<div class="close fixed-top" id="close">
<i class="iconfont icon-close"></i>
<i class="fa-solid fa-circle-xmark"></i>
</div>
<div class="line" style="margin-top: 1rem;">
<i class="iconfont icon-right-copy"></i>
<i class="fa-solid fa-angle-left"></i>
<span class="line-text">时间胶囊</span>
<i class="iconfont icon-right"></i>
<i class="fa-solid fa-angle-right"></i>
</div>
<div class="date" id="date">
<div class="item" id="dayProgress">
@ -296,9 +304,9 @@
</div>
</div>
<div class="line">
<i class="iconfont icon-right-copy"></i>
<i class="fa-solid fa-angle-left"></i>
<span class="line-text">杂七杂八</span>
<i class="iconfont icon-right"></i>
<i class="fa-solid fa-angle-right"></i>
</div>
<!--网站链接-->
<div class="row">
@ -353,7 +361,7 @@
<div class="box-wrapper">
<!--关闭按钮-->
<div class="closebox fixed-top" id="closemore">
<i class="iconfont icon-close"></i>
<i class="fa-solid fa-circle-xmark"></i>
</div>
<!--左侧内容-->
<div class="box-left">
@ -361,8 +369,9 @@
<span class="img-title">imsyy</span>
<span class="img-text">.top</span><br />
<span class="img-text">&nbsp;&nbsp;v&nbsp;2.2</span>
<a href="https://github.com/imsyy/home" target="_blank"><i
class="iconfont icon-github1"></i></a>
<a href="https://github.com/imsyy/home" target="_blank">
<i class="fa-brands fa-github"></i>
</a>
</div>
<!--更多内容-->
<div class="accordion" id="accordion">
@ -417,20 +426,25 @@
aria-labelledby="headingTwo" data-bs-parent="#accordion">
<div class="accordion-body">
<div class="upnote">
<span class="uptext"><i
class="iconfont icon-plus"></i>&nbsp;壁纸个性化设置</span>
<span class="uptext"><i
class="iconfont icon-plus"></i>&nbsp;音乐播放器支持音量控制</span>
<span class="uptext"><i class="iconfont icon-wrench-fill"></i>&nbsp;修复
CDN 加载缓慢</span>
<span class="uptext"><i
class="iconfont icon-wrench-fill"></i>&nbsp;时光胶囊显示错误</span>
<span class="uptext"><i
class="iconfont icon-wrench-fill"></i>&nbsp;移动端动画及细节</span>
<span class="uptext"><i
class="iconfont icon-wrench-fill"></i>&nbsp;优化部分动画及细节</span>
<span class="uptext"><i class="iconfont icon-undo"></i>&nbsp;<a
href="./old/" style="color:#efefef">点击此处返回旧版站点</a></span>
<span class="uptext">
<i class="fa-solid fa-circle-plus"></i>&nbsp;壁纸个性化设置
</span>
<span class="uptext">
<i class="fa-solid fa-circle-plus"></i>&nbsp;音乐播放器支持音量控制
</span>
<span class="uptext">
<i class="fa-solid fa-screwdriver-wrench"></i>&nbsp;修复 CDN 加载缓慢
</span>
<span class="uptext">
<i class="fa-solid fa-screwdriver-wrench"></i>&nbsp;时光胶囊显示错误</span>
<span class="uptext">
<i class="fa-solid fa-screwdriver-wrench"></i>&nbsp;移动端动画及细节</span>
<span class="uptext">
<i class="fa-solid fa-screwdriver-wrench"></i>&nbsp;优化部分动画及细节</span>
<span class="uptext">
<i class="fa-solid fa-rotate-left"></i>
<a href="./old/" style="color:#efefef">点击此处返回旧版站点</a>
</span>
</div>
</div>
</div>

View File

@ -12,6 +12,7 @@ iziToast.settings({
backgroundColor: '#00000040',
titleColor: '#efefef',
messageColor: '#efefef',
icon: 'Fontawesome',
iconColor: '#efefef',
});
@ -28,6 +29,7 @@ window.addEventListener('load', function () {
setTimeout(function () {
iziToast.show({
timeout: 2500,
icon: false,
title: hello,
message: '欢迎来到我的主页'
});
@ -76,7 +78,7 @@ if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
setTimeout(function () {
iziToast.show({
timeout: 8000,
iconUrl: './img/icon/warn.png',
icon: "fa-solid fa-circle-exclamation",
message: '您正在使用火狐浏览器,部分功能可能不支持'
});
}, 3800);
@ -112,7 +114,7 @@ $('#hitokoto').click(function () {
} else {
iziToast.show({
timeout: 2000,
iconUrl: './img/icon/warn.png',
icon: "fa-solid fa-circle-exclamation",
message: '你点太快了吧'
});
}
@ -235,10 +237,10 @@ $('#switchmenu').on('click', function () {
switchmenu = !switchmenu;
if (switchmenu) {
$('#row').attr('class', 'row menus');
$("#menu").html("<i class='iconfont icon-times'></i>");
$("#menu").html("<i class='fa-solid fa-xmark'></i>");
} else {
$('#row').attr('class', 'row');
$("#menu").html("<i class='iconfont icon-bars'>");
$("#menu").html("<i class='fa-solid fa-bars'></i>");
}
});
@ -260,7 +262,7 @@ window.addEventListener('load', function () {
//关闭移动端样式
if (window.innerWidth >= 600) {
$('#row').attr('class', 'row');
$("#menu").html("<i class='iconfont icon-bars'>");
$("#menu").html("<i class='fa-solid fa-bars'></i>");
//移除移动端切换功能区
$('#rightone').attr('class', 'row rightone');
}
@ -301,7 +303,7 @@ $("#more").hover(function () {
document.oncontextmenu = function () {
iziToast.show({
timeout: 2000,
iconUrl: './img/icon/warn.png',
icon: "fa-solid fa-circle-exclamation",
message: '为了浏览体验,本站禁用右键'
});
return false;
@ -323,7 +325,7 @@ for (var day of days) {
window.addEventListener('load', function () {
iziToast.show({
timeout: 14000,
iconUrl: './img/icon/candle.png',
icon: "fa-solid fa-candle-holder",
message: '今天是中国国家纪念日'
});
}, false);

View File

@ -11,7 +11,7 @@ GitHubhttps://github.com/imsyy/home
*/
var server = "netease"; //netease: 网易云音乐; tencent: QQ音乐; kugou: 酷狗音乐; xiami: 虾米; kuwo: 酷我
var type = "playlist"; //song: 单曲; playlist: 歌单; album: 唱片
var id = "60198"; //封面 ID / 单曲 ID / 歌单 ID
var id = "7452421335"; //封面 ID / 单曲 ID / 歌单 ID
$.ajax({
url: "https://api.wuenci.com/meting/api/?server=" + server + "&type=" + type + "&id=" + id, //json文件位置文件名
@ -31,19 +31,19 @@ $.ajax({
/* 底栏歌词 */
setInterval(function () {
$("#lrc").html("<span class='lrc-show'><i class='iconfont icon-music'></i> " + $(".aplayer-lrc-current").text() + " <i class='iconfont icon-music'></i></span>");
$("#lrc").html("<span class='lrc-show'><i class='fa-solid fa-music-note'></i> " + $(".aplayer-lrc-current").text() + " <i class='fa-solid fa-music-note'></i></span>");
}, 500);
/* 音乐通知及控制 */
ap.on('play', function () {
music = $(".aplayer-title").text() + $(".aplayer-author").text();
iziToast.info({
timeout: 8000,
iconUrl: './img/icon/music.png',
timeout: 4000,
icon: "fa-solid fa-music-note",
displayMode: 'replace',
message: music
});
$("#play").html("<i class='iconfont icon-pause'>");
$("#play").html("<i class='fa-solid fa-pause'>");
$("#music-name").html($(".aplayer-title").text() + $(".aplayer-author").text());
if ($(document).width() >= 990) {
$('.power').css("cssText", "display:none");
@ -52,7 +52,7 @@ $.ajax({
});
ap.on('pause', function () {
$("#play").html("<i class='iconfont icon-play'>");
$("#play").html("<i class='fa-solid fa-play'>");
if ($(document).width() >= 990) {
$('#lrc').css("cssText", "display:none !important");
$('.power').css("cssText", "display:block");
@ -114,21 +114,21 @@ $.ajax({
var x = $("#volume").val();
ap.volume(x, true);
if (x == 0) {
$("#volume-ico").html("<i class='iconfont icon-volume-x'></i>");
$("#volume-ico").html("<i class='fa-solid fa-volume-xmark'></i>");
} else if (x > 0 && x <= 0.3) {
$("#volume-ico").html("<i class='iconfont icon-volume'></i>");
$("#volume-ico").html("<i class='fa-solid fa-volume-low'></i>");
} else if (x > 0.3 && x <= 0.6) {
$("#volume-ico").html("<i class='iconfont icon-volume-1'></i>");
$("#volume-ico").html("<i class='fa-solid fa-volume'></i>");
} else {
$("#volume-ico").html("<i class='iconfont icon-volume-2'></i>");
$("#volume-ico").html("<i class='fa-solid fa-volume-high'></i>");
}
});
},
error: function () {
setTimeout(function () {
iziToast.info({
timeout: 12000,
iconUrl: './img/icon/warn.png',
timeout: 8000,
icon: "fa-solid fa-circle-exclamation",
displayMode: 'replace',
message: '音乐播放器加载失败'
});

View File

@ -84,6 +84,7 @@ $(document).ready(function () {
var rd = Math.floor(Math.random() * 10);
$('#bg').attr('src', pictures[rd]) //随机默认壁纸
iziToast.show({
icon: "fa-solid fa-image",
timeout: 2500,
message: '壁纸设置成功',
});
@ -93,6 +94,7 @@ $(document).ready(function () {
setBgImg(bg_img);
$('#bg').attr('src', 'https://api.dujin.org/bing/1920.php'); //必应每日
iziToast.show({
icon: "fa-solid fa-image",
timeout: 2500,
message: '壁纸设置成功',
});
@ -102,6 +104,7 @@ $(document).ready(function () {
setBgImg(bg_img);
$('#bg').attr('src', 'https://api.ixiaowai.cn/gqapi/gqapi.php'); //随机风景
iziToast.show({
icon: "fa-solid fa-image",
timeout: 2500,
message: '壁纸设置成功',
});
@ -111,6 +114,7 @@ $(document).ready(function () {
setBgImg(bg_img);
$('#bg').attr('src', 'https://api.ixiaowai.cn/api/api.php'); //随机动漫
iziToast.show({
icon: "fa-solid fa-image",
timeout: 2500,
message: '壁纸设置成功',
});