This commit is contained in:
haoouba
2021-02-15 13:26:39 +08:00
parent fc2694300e
commit a584edd880
9 changed files with 80 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -487,7 +487,7 @@
display: flex;
align-items: center;
color: var(--routine);
line-height: 28px;
padding: 5px 0;
.icon {
width: 15px;
height: 15px;
@@ -495,6 +495,7 @@
margin-right: 5px;
}
strong {
font-weight: 500;
color: var(--theme);
}
}
@@ -2181,6 +2182,9 @@
align-items: center;
justify-content: space-between;
min-height: 65px;
.run {
margin: 0 auto 0 10px;
}
a {
color: var(--minor);
transition: all 0.35s;
@@ -2602,6 +2606,16 @@
}
}
.joe_run {
&__day,
&__hour,
&__minute,
&__second {
font-weight: 500;
color: var(--theme);
}
}
.profile-color-modes-illu-frame {
opacity: 0;
}

File diff suppressed because one or more lines are too long

View File

@@ -400,6 +400,18 @@ html {
}
}
}
.joe_footer .joe_container {
flex-direction: column;
justify-content: center;
padding-top: 10px;
padding-bottom: 10px;
> .item {
padding: 5px 0;
.run {
margin: 0;
}
}
}
}
}

View File

@@ -406,4 +406,33 @@ document.addEventListener('DOMContentLoaded', () => {
$(this).toggleClass('in').siblings('.panel-body').stop().toggle('fast')
})
}
/* 初始化网站运行时间 */
{
const getRunTime = () => {
const birthDay = new Date('2021/1/1 00:00:00')
const today = +new Date()
const timePast = today - birthDay.getTime()
let day = timePast / (1000 * 24 * 60 * 60)
let dayPast = Math.floor(day)
let hour = (day - dayPast) * 24
let hourPast = Math.floor(hour)
let minute = (hour - hourPast) * 60
let minutePast = Math.floor(minute)
let second = (minute - minutePast) * 60
let secondPast = Math.floor(second)
day = String(dayPast).padStart(2, 0)
hour = String(hourPast).padStart(2, 0)
minute = String(minutePast).padStart(2, 0)
second = String(secondPast).padStart(2, 0)
$('.joe_run__day').html(day)
$('.joe_run__hour').html(hour)
$('.joe_run__minute').html(minute)
$('.joe_run__second').html(second)
}
if (Joe.BIRTHDAY) {
getRunTime()
setInterval(getRunTime, 1000)
}
}
})