# Post wordcount display settings # Dependencies: https://github.com/theme-next/hexo-symbols-count-time symbols_count_time: separated_meta:true #文章中的顯示是否顯示文字(本文字數|閱讀時長) item_text_post:true #網頁底部的顯示是否顯示文字(站點總字數|站點閱讀時長) item_text_total:false # Average Word Length (chars count in word) awl:4 # Words Per Minute wpm:275
footer: since:2018 # Icon between year and copyright info. icon: name:user animated:false color:"#808080" powered: # Hexo link (Powered by Hexo). enable:true # Version info of Hexo after Hexo link (vX.X.X). version:true theme: # Theme & scheme info link (Theme - NexT.scheme). enable:false # Version info of NexT after scheme info (vX.X.X). version:false
<span id="sitetime"></span> <script language=javascript> function siteTime(){ window.setTimeout("siteTime()", 1000); var seconds = 1000; var minutes = seconds * 60; var hours = minutes * 60; var days = hours * 24; var years = days * 365; var today = new Date(); var todayYear = today.getFullYear(); var todayMonth = today.getMonth()+1; var todayDate = today.getDate(); var todayHour = today.getHours(); var todayMinute = today.getMinutes(); var todaySecond = today.getSeconds(); var t1 = Date.UTC(2018,06,07,12,00,00); // 設置建立網站的時間 var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond); var diff = t2-t1; var diffYears = Math.floor(diff/years); var diffDays = Math.floor((diff/days)-diffYears*365); var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours); var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes); var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds); document.getElementById("sitetime").innerHTML=" 已運行"+diffYears+" 年 "diffDays+" 天 "+diffHours+" 小時 "+diffMinutes+" 分鐘 "+diffSeconds+" 秒"; } siteTime(); </script>