add pc homepage

master
IoTcat 5 years ago
parent 31367471ef
commit d6194721ac
  1. 35
      server/cn/etc/nginx/nginx.conf
  2. 242
      server/cn/home/www/HomePage/css/Index.css
  3. BIN
      server/cn/home/www/HomePage/images/Logo.png
  4. BIN
      server/cn/home/www/HomePage/images/Thumbs.db
  5. BIN
      server/cn/home/www/HomePage/images/ZhiBo8.png
  6. BIN
      server/cn/home/www/HomePage/images/_2018FIFA.png
  7. BIN
      server/cn/home/www/HomePage/images/body.jpg
  8. BIN
      server/cn/home/www/HomePage/images/logo.gif
  9. BIN
      server/cn/home/www/HomePage/images/logo2.gif
  10. BIN
      server/cn/home/www/HomePage/images/logo3.gif
  11. BIN
      server/cn/home/www/HomePage/images/web_icons/163.png
  12. BIN
      server/cn/home/www/HomePage/images/web_icons/3DM.png
  13. BIN
      server/cn/home/www/HomePage/images/web_icons/Amazon.png
  14. BIN
      server/cn/home/www/HomePage/images/web_icons/Apple.png
  15. BIN
      server/cn/home/www/HomePage/images/web_icons/BBC.png
  16. BIN
      server/cn/home/www/HomePage/images/web_icons/BaiDisk.png
  17. BIN
      server/cn/home/www/HomePage/images/web_icons/Baidu.png
  18. BIN
      server/cn/home/www/HomePage/images/web_icons/Bilibili.png
  19. BIN
      server/cn/home/www/HomePage/images/web_icons/Blog.png
  20. BIN
      server/cn/home/www/HomePage/images/web_icons/CBlog.png
  21. BIN
      server/cn/home/www/HomePage/images/web_icons/Cnbeta.png
  22. BIN
      server/cn/home/www/HomePage/images/web_icons/Dictionary.png
  23. BIN
      server/cn/home/www/HomePage/images/web_icons/Douban.png
  24. BIN
      server/cn/home/www/HomePage/images/web_icons/Drive.png
  25. BIN
      server/cn/home/www/HomePage/images/web_icons/Engadget.png
  26. BIN
      server/cn/home/www/HomePage/images/web_icons/Facebook.png
  27. BIN
      server/cn/home/www/HomePage/images/web_icons/Gamersky.png
  28. BIN
      server/cn/home/www/HomePage/images/web_icons/Geekpark.png
  29. BIN
      server/cn/home/www/HomePage/images/web_icons/Github.png
  30. BIN
      server/cn/home/www/HomePage/images/web_icons/Google.png
  31. BIN
      server/cn/home/www/HomePage/images/web_icons/Hackers.png
  32. BIN
      server/cn/home/www/HomePage/images/web_icons/Hupu.png
  33. BIN
      server/cn/home/www/HomePage/images/web_icons/Huxiu.png
  34. BIN
      server/cn/home/www/HomePage/images/web_icons/IThome.png
  35. BIN
      server/cn/home/www/HomePage/images/web_icons/InfoQ.png
  36. BIN
      server/cn/home/www/HomePage/images/web_icons/JD.png
  37. BIN
      server/cn/home/www/HomePage/images/web_icons/LeQiu.png
  38. BIN
      server/cn/home/www/HomePage/images/web_icons/Leiphone.png
  39. BIN
      server/cn/home/www/HomePage/images/web_icons/Map.png
  40. BIN
      server/cn/home/www/HomePage/images/web_icons/MeiTuan.png
  41. BIN
      server/cn/home/www/HomePage/images/web_icons/Outlook.png
  42. BIN
      server/cn/home/www/HomePage/images/web_icons/Panda.png
  43. BIN
      server/cn/home/www/HomePage/images/web_icons/People.png
  44. BIN
      server/cn/home/www/HomePage/images/web_icons/PlayStation.png
  45. BIN
      server/cn/home/www/HomePage/images/web_icons/SRs.png
  46. BIN
      server/cn/home/www/HomePage/images/web_icons/Sports.png
  47. BIN
      server/cn/home/www/HomePage/images/web_icons/Stack.png
  48. BIN
      server/cn/home/www/HomePage/images/web_icons/Starbucks.png
  49. BIN
      server/cn/home/www/HomePage/images/web_icons/Steam.png
  50. BIN
      server/cn/home/www/HomePage/images/web_icons/Stone.png
  51. BIN
      server/cn/home/www/HomePage/images/web_icons/Taobao.png
  52. BIN
      server/cn/home/www/HomePage/images/web_icons/Thumbs.db
  53. BIN
      server/cn/home/www/HomePage/images/web_icons/Tmtpost.png
  54. BIN
      server/cn/home/www/HomePage/images/web_icons/Toutiao.png
  55. BIN
      server/cn/home/www/HomePage/images/web_icons/Twitch.png
  56. BIN
      server/cn/home/www/HomePage/images/web_icons/Twitter.png
  57. BIN
      server/cn/home/www/HomePage/images/web_icons/V2EX.png
  58. BIN
      server/cn/home/www/HomePage/images/web_icons/VOA.png
  59. BIN
      server/cn/home/www/HomePage/images/web_icons/Vimeo.png
  60. BIN
      server/cn/home/www/HomePage/images/web_icons/WashPost.png
  61. BIN
      server/cn/home/www/HomePage/images/web_icons/Weibo.png
  62. BIN
      server/cn/home/www/HomePage/images/web_icons/Wikipedia.png
  63. BIN
      server/cn/home/www/HomePage/images/web_icons/Youtube.png
  64. BIN
      server/cn/home/www/HomePage/images/web_icons/ZhiBo8.png
  65. BIN
      server/cn/home/www/HomePage/images/web_icons/Zhihu.png
  66. BIN
      server/cn/home/www/HomePage/images/web_icons/_20170717_HackerNews.png
  67. BIN
      server/cn/home/www/HomePage/images/web_icons/_20170718_Insgram.png
  68. BIN
      server/cn/home/www/HomePage/images/web_icons/_20170807_Haosou.png
  69. BIN
      server/cn/home/www/HomePage/images/web_icons/_20171212_Amap.png
  70. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180404_Acfun.png
  71. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180404_Food.png
  72. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180404_OverWatch.png
  73. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180404_WoT.png
  74. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180420_Tmtpost.png
  75. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Converse.png
  76. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_DJI.png
  77. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Damai.png
  78. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Dgtle.png
  79. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Pingwest.png
  80. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Pocket.png
  81. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_Sspai.png
  82. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180422_TED.png
  83. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180517_Lagou.png
  84. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180607_CSDN.png
  85. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180607_Zealer.png
  86. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180702_Dropbox.png
  87. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180913_Gold.png
  88. BIN
      server/cn/home/www/HomePage/images/web_icons/_20180913_eBay.png
  89. BIN
      server/cn/home/www/HomePage/images/web_icons/_20181020_ZhiBoMi.png
  90. BIN
      server/cn/home/www/HomePage/images/web_icons/_20190220_A9VG.png
  91. BIN
      server/cn/home/www/HomePage/images/web_icons/iFanr.png
  92. 795
      server/cn/home/www/HomePage/index.php

@ -77,8 +77,8 @@ http {
server {
#listen 80;
server_name www.eee.dog eee.dog ovo.re www.ovo.re photo.ovo.re acg.watch www.acg.watch iotcat.me www.iotcat.me iotcat.xyz www.iotcat.xyz www.yimian.xyz yimian.xyz api.yimian.xyz cdn.yimian.xyz msc.yimian.xyz mail.yimian.xyz video.yimian.xyz sms.yimian.xyz vpn.yimian.xyz login.yimian.xyz log.yimian.xyz blog.yimian.xyz dans.yimian.ac.cn cdn.yimian.ac.cn cn.yimian.xyz video.api.yimian.xyz photo.yimian.xyz login.api.yimian.xyz moe.api.yimian.xyz photo.api.yimian.xyz mikutap.yimian.xyz gugu.yimian.xyz report.yimian.xyz; #1
listen 80;
server_name www.eee.dog eee.dog ovo.re www.ovo.re photo.ovo.re acg.watch www.acg.watch iotcat.me www.iotcat.me iotcat.xyz www.iotcat.xyz www.yimian.xyz yimian.xyz api.yimian.xyz cdn.yimian.xyz msc.yimian.xyz mail.yimian.xyz video.yimian.xyz sms.yimian.xyz vpn.yimian.xyz login.yimian.xyz log.yimian.xyz blog.yimian.xyz dans.yimian.ac.cn cdn.yimian.ac.cn cn.yimian.xyz video.api.yimian.xyz photo.yimian.xyz login.api.yimian.xyz moe.api.yimian.xyz photo.api.yimian.xyz mikutap.yimian.xyz gugu.yimian.xyz report.yimian.xyz homepage.yimian.xyz; #1
rewrite ^(.*)$ https://$host$1 permanent;
}
@ -685,6 +685,37 @@ http {
}
server {
listen 443 ssl;
#listen 80;
server_name homepage.yimian.xyz; #1
root /home/www/HomePage;
index index.php index.html;
client_max_body_size 1000M;
ssl_certificate /etc/letsencrypt/live/homepage.yimian.xyz/fullchain.pem; #2
ssl_certificate_key /etc/letsencrypt/live/homepage.yimian.xyz/privkey.pem; #3
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
error_page 404 = /404.php;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 443 ssl;
#listen 80;

@ -0,0 +1,242 @@

#logo{
width: 280px;
height: 100px;
margin-top: 55px;
margin-left: auto;
margin-right: auto;
}
#search-bar{
margin-top: 55px;
width: 600px;
height: 100px;
margin-left: auto;
margin-right: auto;
}
#search-bar input {
width: 580px;
height: 25px;
padding: 9px 10px;
font-family: 'Microsoft YaHei UI',arial,sans-serif;
font-size: 15px;
color: #555;
border: none;
background: #fff;
overflow: hidden;
outline:none;
vertical-align: middle;
box-shadow: 1px 1px 3px rgb(160,160,160);
border-radius: 2px;
}
#search-bar button {
margin-top: 20px;
margin-left: 20px;
width: 105px;
height: 35px;
overflow: hidden;
text-align: center;
font-size: 15px;
font-weight: bold;
color: rgb(100,100,100);
border: none;
overflow: hidden;
vertical-align: middle;
outline: none;
cursor: pointer;
border-radius: 2px;
background-color: rgb(255,255,255);
box-shadow: 0px 0px 1px rgb(160,160,160);
}
#search-bar button:hover{
background-color: rgb(240,240,240);
box-shadow: 0px 0px 3px rgb(160,160,160);
}
#nav-panel{
margin-top: 20px;
margin-bottom: 100px;
width: 840px;
height: 285px;
margin-left: auto;
margin-right: auto;
padding-left: 30px;
padding-top: 10px;
background-color: #FFFFFF;
border: 1px solid rgb(210,210,210);
}
.nav-panel-line{
clear: both;
width: 810px;
height:1px;
background-color: #F0F0F0;
}
.nav-panel-item {
float: left;
display: block;
height: 40px;
width: 160px;
border: 1px solid transparent;
text-decoration: none;
color: #333;
}
.nav-panel-item:hover
{
background-color: #F7F7F7;
}
.nav-panel-item-img{
float: left;
margin-top: 12px;
margin-left: 15px;
}
.nav-panel-item-txt {
float: left;
margin-left: 5px;
line-height: 40px;
height: 40px;
}
canvas {
cursor:default;
z-index:1;
margin:0 -22%;
}
.nope {
color:#fff;
text-align:center;
margin-top:150px;
}
header {
position:relative;
text-shadow:1px 1px 0px rgba(0,0,0,0.5);
text-transform:uppercase;
width:100%;
z-index:10;
}
#about {
color:#fff;
color:rgba(255,255,255,0.5);
display:block;
float:right;
margin:20px;
text-align:right;
width:50%;
}
h1 {
color:rgba(255,255,255,0.75);
float:left;
font-size:10px;
font-weight:normal;
margin:20px;
}
a {
color:rgba(255,255,255,0.5);
display:inline-block;
text-decoration:none;
transition:0.5s ease color;
-moz-transition:0.5s ease color;
-o-transition:0.5s ease color;
-webkit-transition:0.5s ease color;
}
a:hover {
color:rgba(255,255,255,0.75);
}
ul#options {
list-style:none;
margin:10px 0 0;
position:relative;
right:0;
z-index:10;
}
ul#options li {
margin:5px 0;
min-width:200px;
opacity:0;
transition:0.25s ease-in opacity;
-moz-transition:0.25s ease-in opacity;
-o-transition:0.25s ease-in opacity;
-webkit-transition:0.25s ease-in opacity;
}
ul#options li.group {
margin-top:15px;
}
ul#options li * {
display:none;
}
ul#options li a {
box-shadow:1px 1px 3px rgba(0,0,0,0.25);
background-color:rgba(0,0,0,0.5);
border-radius:3px;
padding:3px 5px;
position:relative;
transition:0.5s ease all;
-moz-border-radius:3px;
-o-box-shadow:1px 1px 3px rgba(0,0,0,0.25);
-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.25);
-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.25);
-moz-transition:0.5s ease all;
-o-transition:0.5s ease all;
-webkit-transition:0.5s ease all;
}
ul#options li a:hover {
color:rgba(255,255,255,0.75);
}
ul#options li a.on {
background-color:rgba(255,255,255,0.8);
color:rgba(0,0,0,0.9);
text-shadow:0px 0px 0px;
}
ul#options li a.on:after {
content:"\2713 ";
}
ul#options.on li {
opacity:1;
right:20px;
}
ul#options.on li * {
display:inline-block;
}
ul#borders {
}ul#borders li {
position:fixed;
list-style:none;
margin:0;
background-color:transparent;
background-color:rgba(0,0,0,0.05);
z-index:100;
}
li#top {
height:10px;
left:0;
right:0;
top:0;
}
li#right {
bottom:10px;
right:0;
top:10px;
width:10px;
}
li#bottom {
bottom:0;
height:10px;
left:0;
right:0;
}
li#left {
bottom:10px;
left:0;
top:10px;
width:10px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,795 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Yimian HomePage</title>
<script type="text/javascript">document.write('<style type="text/css">body{background-image: url("https://api.yimian.xyz/moe?i=PCBackground&k&s='+Math.random()+'");}</style>');</script>
<style type="text/css">
body{
background-size: 100% 100%;
font-family: 'Microsoft YaHei UI',arial,sans-serif;
font-size: 13px;
}
</style>
<link rel="stylesheet" href="./css/Index.css">
<link rel="shortcut icon" href="https://cdn.yimian.xyz/img/logo/logo.ico"/>
<script>
//LISTEN ENTER KEYDOWN EVENT
document.onkeydown = function(e){
if(!e){
e = window.event;
}
if((e.keyCode || e.which) == 13){
do_search();
}
}
//DO SEARCH EVENT
function do_baidu_search() {
var search_txt = document.getElementById("search-bar-input").value;
if (search_txt == "") {
alert("search text is empty ! ");
return false;
}
var search_url = "https://www.baidu.com/s?wd=" + search_txt;
window.open(search_url);
}
function do_google_search() {
var search_txt = document.getElementById("search-bar-input").value;
if (search_txt == "") {
alert("search text is empty ! ");
return false;
}
var search_url = "https://www.google.com/search?newwindow=1&hl=zh-CN&q=" + search_txt;
window.open(search_url);
}
function on_enter_key(){
if (event.keyCode==13){
var search_txt = document.getElementById("search-bar-input").value;
if (search_txt == "") {
alert("search text is empty ! ");
return false;
}
var search_url = "https://www.google.com/search?newwindow=1&hl=zh-CN&q=" + search_txt;
window.open(search_url);
}
}
</script>
</head>
<body>
<!---------------------------------------------------------------------------------------------------->
<div id="logo">
<canvas width="400" height="150" id="canvas"></canvas>
<!--<a href="https://iotcat.me" target="_blank"><img src="./images/logo3.gif" alt="tojohnonly" height="150"></a>-->
</div>
<!---------------------------------------------------------------------------------------------------->
<div id="search-bar">
<input id="search-bar-input" onkeydown="on_enter_key()" type="text" placeholder="search everything ..." autocomplete="off">
<button style="margin-left: 185px;" onclick="do_google_search()">Google</button><a class="close"></a>
<button onclick="do_baidu_search()">百度</button><a class="close"></a>
</div>
<!---------------------------------------------------------------------------------------------------->
<div id="nav-panel">
<a class="nav-panel-item" title="西交利物浦" href="https://www.xjtlu.edu.cn/" target="_blank">
<img src="https://gss1.bdstatic.com/5bVZsj_p_tVS5dKfpU_Y_D3/qiusuo_icon/ffa0c2155aa92fbfab7bbdb06f3b02cb.png" alt="Google" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">西交利物浦</div>
</a>
<a class="nav-panel-item" title="WeChat" href="https://wx.qq.com/" target="_blank">
<img src="https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=3528894059,640966735&fm=58" alt="Wikipedia" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">微信</div>
</a>
<a class="nav-panel-item" title="Github" href="https://github.com/" target="_blank">
<img src="./images/web_icons/Github.png" alt="Github" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Github</div>
</a>
<a class="nav-panel-item" title="IoTcat" href="https://www.eee.dog/" target="_blank">
<img src="https://cdn.yimian.xyz/img/logo/head.jpg" alt="Blog" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Blog</div>
</a>
<a class="nav-panel-item" title="Bilibili" href="https://www.bilibili.com/" target="_blank">
<img src="./images/web_icons/Bilibili.png" alt="Bilibili" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Bilibili</div>
</a>
<!----------------------------------------------2------------------------------------------------------>
<div class="nav-panel-line" style="background-color: #d9e9f4"></div>
<a class="nav-panel-item" title="ICE" href="https://ice.xjtlu.edu.cn/" target="_blank">
<img src="https://gss0.bdstatic.com/5bVSsj_p_tVS5dKfpU_Y_D3/qiusuo_icon/0bca72cba3fa7050294271ec0e961710.png" alt="InfoQ" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">ICE</div>
</a>
<a class="nav-panel-item" title="e-Bridge" href="https://ebridge.xjtlu.edu.cn/" target="_blank">
<img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1696532274,1981152654&fm=27&gp=0.jpg" alt="CBlog" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">e-Bridge</div>
</a>
<a class="nav-panel-item" title="Zhihu" href="http://www.zhihu.com/" target="_blank">
<img src="./images/web_icons/Zhihu.png" alt="Zhihu" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Zhihu</div>
</a>
<a class="nav-panel-item" title="Hackers" href="https://news.ycombinator.com/" target="_blank">
<img src="./images/web_icons/Hackers.png" alt="Hackers" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Hackers</div>
</a>
<a class="nav-panel-item" title="BaiDisk" href="http://pan.baidu.com/disk/home" target="_blank">
<img src="./images/web_icons/BaiDisk.png" alt="BaiDisk" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">BaiDisk</div>
</a>
<!----------------------------------------------3------------------------------------------------------>
<div class="nav-panel-line"></div>
<a class="nav-panel-item" title="Youtube" href="https://www.youtube.com/" target="_blank">
<img src="./images/web_icons/Youtube.png" alt="Youtube" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Youtube</div>
</a>
<a class="nav-panel-item" title="Twitter" href="https://twitter.com/" target="_blank">
<img src="./images/web_icons/Twitter.png" alt="Twitter" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Twitter</div>
</a>
<a class="nav-panel-item" title="Weibo" href="https://weibo.com/" target="_blank">
<img src="./images/web_icons/Weibo.png" alt="Weibo" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Weibo</div>
</a>
<a class="nav-panel-item" title="LinkedIn" href="https://www.linkedin.com/feed/" target="_blank">
<img src="https://gss0.bdstatic.com/5bVYsj_p_tVS5dKfpU_Y_D3/qiusuo_icon/129fcef5e6cae3e8a44333afb3b5add6.png" alt="Huxiu" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">LinkedIn</div>
</a>
<a class="nav-panel-item" title="Telegram" href="https://web.telegram.org/#/im" target="_blank">
<img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1554552970603&di=913d1c1bb1149fcc8f768dd93e0245b1&imgtype=0&src=http%3A%2F%2Fa5.mzstatic.com%2Fus%2Fr30%2FPurple6%2Fv4%2Fea%2F2f%2Ff3%2Fea2ff33d-3241-4acf-e17b-53c4b429475f%2FAppIcon.512x512-75.png" alt="Telegram" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Telegram</div>
</a>
<!-----------------------------------------------4----------------------------------------------------->
<div class="nav-panel-line"></div>
<a class="nav-panel-item" title="126" href="https://mail.126.com/" target="_blank">
<img src="https://mail.163.com/favicon.ico" alt="163" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">126邮箱</div>
</a>
<a class="nav-panel-item" title="V2EX" href="https://www.wjx.cn/newwjx/manage/myquestionnaires.aspx" target="_blank">
<img src="https://www.wjx.cn/favicon.ico" alt="V2EX" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">问卷星</div>
</a>
<a class="nav-panel-item" title="蛐蛐钢琴网" href="https://www.tan8.com/piano.html" target="_blank">
<img src="https://www.tan8.com/favicon.ico" alt="蛐蛐钢琴网" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">蛐蛐钢琴网</div>
</a>
<a class="nav-panel-item" title="随手记" href="https://www.feidee.com/money/tally/new.do" target="_blank">
<img src="https://www.feidee.com/favicon.ico" alt="随手记" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">随手记</div>
</a>
<a class="nav-panel-item" title="Greasy Fork" href="https://greasyfork.org/zh-TW" target="_blank">
<img src="https://gss1.bdstatic.com/5bVZsj_p_tVS5dKfpU_Y_D3/qiusuo_icon/3844f41936de5dc907545cb83a92f5bc.png" alt="Greasy Fork" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Greasy Fork</div>
</a>
<!----------------------------------------------5------------------------------------------------------>
<div class="nav-panel-line" style="background-color: #d9f4de"></div>
<a class="nav-panel-item" title="网易公开课" href="https://c.open.163.com/center/myCourse.htm" target="_blank">
<img src="http://c.open.163.com/favicon.ico" alt="网易公开课" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">网易公开课</div>
</a>
<a class="nav-panel-item" title="MOOC" href="https://www.icourse163.org/" target="_blank">
<img src="https://gss0.bdstatic.com/5bVSsj_p_tVS5dKfpU_Y_D3/qiusuo_icon/bc80781cfa3aaf81ae0ebdebed282dcd.png" alt="MOOC" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">中国大学MOOC</div>
</a>
<a class="nav-panel-item" title="Google站长平台" href="https://search.google.com/search-console" target="_blank">
<img src="./images/web_icons/Google.png" alt="Google站长平台" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Google站长平台</div>
</a>
<a class="nav-panel-item" title="IEEE" href="https://ieeexplore.ieee.org/Xplore/home.jsp" target="_blank">
<img src="https://ieeexplore.ieee.org/favicon.ico" alt="IEEE" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">IEEE</div>
</a>
<a class="nav-panel-item" title="Pixiv" href="https://www.pixiv.net/" target="_blank">
<img src="https://www.pixiv.net/favicon.ico" alt="Pixiv" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">Pixiv</div>
</a>
<!--------------------------------------------6-------------------------------------------------------->
<div class="nav-panel-line"></div>
<a class="nav-panel-item" title="vultr" href="https://my.vultr.com/" target="_blank">
<img src="https://my.vultr.com/favicon.ico" alt="vultr" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">vultr</div>
</a>
<a class="nav-panel-item" title="腾讯云" href="https://console.cloud.tencent.com/" target="_blank">
<img src="https://imgcache.qq.com/qcloud/app/resource/ac/favicon.ico" alt="腾讯云" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">腾讯云</div>
</a>
<a class="nav-panel-item" title="华为云" href="https://console.huaweicloud.com/console/" target="_blank">
<img src="https://console-static.huaweicloud.com/static/framework/5.0.0/theme/default/images/favicon.ico?ttf=1653661296" alt="华为云" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">华为云</div>
</a>
<a class="nav-panel-item" title="阿里云" href="https://home.console.aliyun.com/" target="_blank">
<img src="https://home.console.aliyun.com/favicon.ico" alt="阿里云" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">阿里云</div>
</a>
<a class="nav-panel-item" title="internet.bs" href="https://internetbs.net/zh/domain-name-registrations/HomePage.html" target="_blank">
<img src="https://internetbs.net/favicon.ico" alt="internet.bs" height="16" width="16" class="nav-panel-item-img">
<div class="nav-panel-item-txt">internet.bs域名</div>
</a>
</div>
<header>
<h1>Yimian HomePage</h1>
<div id="about">
<a href="#" id="toggle-options"></a>
<ul id="options">
<a href="#" id="quivers" class=""></a>
<a href="#" id="gradient" class="on"></a>
<a href="#" id="color" class="on"></a>
<a href="#" id="valentineify" class=""></a>
<li class="group"><span>Mouse down: explode and repel</span></li>
<li><span>Mouse down + shift: explode and attract</span></li>
<li><span>Arrow Up: increase particle size</span></li>
<li class="group"><span>Sorry about your CPU</span></li>
<li><span id="fps"></span></li>
</ul>
</div>
</header>
<script>
var Clock = (function() {
// private variables
var canvas, // canvas element
ctx, // canvas context
bgGrad = true, // background gradient flag
gradient, // gradient (background)
height = 150, // canvas height
key = {up: false, shift: false}, // key presses
particles = [], // particle array
particleColor = 'hsla(0, 0%, 100%, 0.3)', // particle color
mouse = {x: 0, y: 0}, // position of mouse / touch
press = false, // pressed flag
quiver = false, // quiver flag
text, // the text to copy pixels from
textSize = 80, // (initial) textsize
valentine = false, // valentine-ify it for a bit?
msgTime = 100, // time to show a message before returning to clock
updateColor = true, // update color of gradient / particles with time?
width = 200; // canvas width
// Constants
var FRAME_RATE = 20, // frames per second target
MIN_WIDTH = 900, // minimum width of canvas
MIN_HEIGHT = 400, // minimum height of canvas
PARTICLE_NUM = 6000, // (max) number of particles to generate
RADIUS = Math.PI * 2; // radius of particle
var defaultStyles = function() {
textSize = 140;
// particle color
particleColor = 'hsla(0, 0%, 100%, 0.3)';
// color stops
var gradientStops = {
};
// create gradient
setGradient(gradientStops);
};
var draw = function(p) {
ctx.fillStyle = particleColor;
ctx.beginPath();
ctx.arc(p.x, p.y, p.size, 0, RADIUS, true);
ctx.closePath();
ctx.fill();
};
var explode = function() {
for(var i = 0, l = particles.length; i < l; i++) {
var p = particles[i];
if(p.inText) {
var ax = mouse.x - p.px,
ay = mouse.y - p.py,
angle = Math.atan2(ay, ax),
polarity,
C = Math.cos(angle),
S = Math.sin(angle);
// change polarity
// attract particles if mouse pressed, repel if shift + mousedown
polarity = (key.shift === true) ? -1 : 1;
p.x += polarity * (Math.pow((C-1), 2) -1) + p.velocityX * p.delta;
p.y += polarity * (Math.pow((S-1), 2) -1) + p.velocityY * p.delta;
// set previous positions
p.px = p.x;
p.py = p.y;
draw(p);
}
}
};
var getTime = function(amPM) {
var date = new Date(),
hours = date.getHours(),
timeOfDay = '';
if(amPM) {
//hours = ( hours > 12 ) ? hours -= 12 : hours;
hours = ( hours == 0 ) ? 12 : hours;
} else {
hours = pad(hours);
}
var minutes = pad(date.getMinutes());
var seconds = pad(date.getSeconds());
return {
hours: hours,
minutes: minutes,
seconds: seconds,
timeString: hours + " : " + minutes + " : " + seconds
};
};
// animation loop
var loop = function() {
// clear out text
ctx.clearRect(0, 0, width, height);
var time = getTime(true);
textSize = 85;
// draw text on canvas
if(valentine === true) {
if(msgTime > 0) {
textSize = 180;
text = '?';
msgTime--;
} else {
text = time.timeString;
}
// valentine-ify it by setting hue to pink
setStyles(100);
} else if(updateColor === true && bgGrad === true) {
// changing color with time
// @TODO: come up with something better, this is a hacky implementation
//var color = time.hours + time.minutes + time.seconds;
//setStyles(color);
text = time.timeString;
} else {
//defaultStyles();
text = time.timeString;
}
text += ' ';
//particleColor = 'hsla('+Math.random()+', 10%, 50%, 0.3)';
ctx.fillStyle = "rgba(255, 255, 255, 0.6)";
ctx.textBaseline = "middle";
ctx.font = textSize + "px 'Avenir', 'Helvetica Neue', 'Arial', 'sans-serif'";
ctx.fillText(text, (width - ctx.measureText(text).width) * 0.5, height * 0.5);
// copy pixels
var imgData = ctx.getImageData(0, 0, width, height);
// clear canvas, again
ctx.clearRect(0, 0, width, height);
if(bgGrad === true) {
// draw gradient
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, width, height);
}
if(press === false) {
// reset particles
for(var i = 0, l = particles.length; i < l; i++) {
var p = particles[i];
p.inText = false;
}
particleText(imgData);
} else {
explode();
}
FPS.update('fps');
};
var pad = function(number) {
return ('0' + number).substr(-2);
};
var particleText = function(imgData) {
var pxls = [];
for(var w = width; w > 0; w-=6) {
for(var h = 0; h < width; h+=6) {
var index = (w+h*(width))*4;
if(imgData.data[index] > 10) {
pxls.push([w, h]);
}
}
}
var count = pxls.length;
for(var i = 0; i < pxls.length && i < particles.length; i++) {
try {
var p = particles[i],
X,
Y;
if(quiver) {
X = (pxls[count-1][0]) - (p.px + Math.random() * 5);
Y = (pxls[count-1][1]) - (p.py + Math.random() * 5);
} else {
X = (pxls[count-1][0]) - p.px;
Y = (pxls[count-1][1]) - p.py;
}
// tangent
var T = Math.sqrt(X*X + Y*Y);
// arctangent
var A = Math.atan2(Y, X);
// cosine
var C = Math.cos(A);
// sine
var S = Math.sin(A);
// set new postition
p.x = p.px + C * T * p.delta;
p.y = p.py + S * T * p.delta;
// set previous positions
p.px = p.x;
p.py = p.y;
p.inText = true;
// draw the particle
draw(p);
if(key.up === true) {
p.size += 0.3;
} else {
var newSize = p.size - 0.5;
if(newSize > p.origSize && newSize > 0) {
p.size = newSize;
} else {
p.size = m.origSize;
}
}
} catch(e) {
//console.log(e);
}
count--;
}
};
var setCoordinates = function(e) {
if(e.offsetX) {
return { x: e.offsetX, y: e.offsetY }; // use offset if available
} else if (e.layerX) {
return { x: e.layerX, y: e.layerY }; // firefox... make sure to position the canvas
} else {
// iOS. Maybe others too?
return { x: e.pageX - canvas.offsetLeft, y: e.pageY - canvas.offsetTop };
}
};
// set dimensions of canvas
var setDimensions = function () {
//width = Math.max(window.innerWidth, MIN_WIDTH);
//height = Math.max(window.innerHeight, MIN_HEIGHT);
width = 700;
height = 130;
// Resize the canvas
canvas.width = width;
canvas.height = height;
//canvas.style.position = 'absolute';
//canvas.style.left = '0px';
//canvas.style.top = '0px';
};
var setGradient = function(gradientStops) {
// create gradient
gradient = ctx.createRadialGradient(width / 2, height / 2, 0, width / 2, height / 2, width);
// iterate through colorstops
for (var position in gradientStops) {
var color = gradientStops[position];
gradient.addColorStop(position, color);
}
};
var setStyles = function(hue) {
// color stops
var gradientStops = {
0: 'hsl(' + hue + ', 50%, 100%, 0)',
0.5: 'hsl(' + hue +', 50%, 50%, 0)'
};
// change particle color
particleColor = 'hsla(' + hue + ', 10%, 50%, 0.3)';
// create gradient
setGradient(gradientStops);
};
/**
* Public Methods
*/
return {
init: function(canvasID) {
canvas = document.getElementById(canvasID);
// make sure canvas exists and that the browser understands it
if(canvas === null || !canvas.getContext) {
return;
}
// set context
ctx = canvas.getContext("2d");
ctx.fillStyle = 'rgba(255, 255, 255, 0)';
// set dimensions
setDimensions();
// ui
this.ui();
for(var i = 0; i < PARTICLE_NUM; i++) {
particles[i] = new Particle(canvas);
}
// show FPS
FPS.initialize(canvas, 'fps');
// set defaults
defaultStyles();
// let's do this
setInterval(loop, FRAME_RATE);
},
ui: function() {
// UI: buttons and events
var toggleOptions = document.getElementById('toggle-options'),
options = document.getElementById('options'),
onMsg = '[-] Hide Options',
offMsg = '[+] Show Options',
quiverBtn = document.getElementById('quivers'),
gradientBtn = document.getElementById('gradient'),
valentineifyBtn = document.getElementById('valentineify'),
colorBtn = document.getElementById('color');
toggleOptions.innerHTML = offMsg;
/**
* Events
*/
toggleOptions.addEventListener('click', function(e) {
e.preventDefault();
if(options.className === 'on') {
options.className = '';
toggleOptions.innerHTML = offMsg;
} else {
options.className = 'on';
toggleOptions.innerHTML = onMsg;
}
}, false);
quiverBtn.addEventListener('click', function(e) {
e.preventDefault();
if(quiverBtn.className === 'on') {
quiverBtn.className = '';
quiver = false;
} else {
quiverBtn.className = 'on';
quiver = true;
}
}, false);
gradientBtn.addEventListener('click', function(e) {
e.preventDefault();
if(gradientBtn.className === 'on') {
gradientBtn.className = '';
bgGrad = false;
} else {
gradientBtn.className = 'on';
bgGrad = true;
}
}, false);
valentineifyBtn.addEventListener('click', function(e) {
e.preventDefault();
if(valentineifyBtn.className === 'on') {
valentineifyBtn.className = '';
valentine = false;
msgTime = 0;
} else {
valentineifyBtn.className = 'on';
msgTime = 60;
valentine = true;
}
}, false);
colorBtn.addEventListener('click', function(e) {
e.preventDefault();
if(colorBtn.className === 'on') {
colorBtn.className = '';
updateColor = false;
} else {
colorBtn.className = 'on';
updateColor = true;
}
}, false);
document.addEventListener('keydown', function(e) {
switch(e.keyCode ) {
case 16: // shift
key.shift = true;
e.preventDefault();
break;
case 38: // up key
key.up = true;
e.preventDefault();
break;
}
}, false);
document.addEventListener('keyup', function(e) {
switch(e.keyCode ) {
case 16: // shift
key.shift = false;
e.preventDefault();
break;
case 38: // space
key.up = false;
e.preventDefault();
break;
}
}, false);
window.addEventListener('resize', function(e){
setDimensions();
}, false);
canvas.addEventListener('mousedown', function(e){
press = true;
}, false);
document.addEventListener('mouseup', function(e){
press = false;
}, false);
canvas.addEventListener('mousemove', function(e) {
if(press) {
mouse = setCoordinates(e);
}
}, false);
// @TODO: add touch events
}
};
})();
// Create new particles
var Particle = function(canvas) {
var range = Math.random() * 180 / Math.PI, // random starting point
spread = canvas.height, // how far away from text should the particles begin?
size = Math.random() * 6; // random size of particle
this.delta = 0.25;
this.x = 0;
this.y = 0;
// starting positions
this.px = (canvas.width / 2) + (Math.cos(range) * spread);
this.py = (canvas.height / 2) + (Math.sin(range) * spread);
this.velocityX = Math.floor(Math.random() * 10) - 5;
this.velocityY = Math.floor(Math.random() * 10) - 5;
this.size = size;
this.origSize = size;
this.inText = false;
};
var FPS = {
// defaults
delta: 0,
lastTime: 0,
frames: 0,
totalTime: 0,
updateTime: 0,
updateFrames: 0,
initialize: function(canvasID, fpsID) {
this.lastTime = (new Date()).getTime();
if(!document.getElementById(fpsID) && document.getElementById(canvasID)) {
this.createFPS(canvasID, fpsID);
}
},
// create FPS div if needed
createFPS: function(canvasID, fpsID) {
var div = document.createElement('div');
div.setAttribute('id', fpsID);
var canvas = document.getElementById(canvasID);
var parent = canvas.parentNode;
div.innerHTML = "FPS AVG: 0 CURRENT: 0";
parent.appendChild(div);
},
// update FPS count
update: function(fpsID) {
var now = (new Date()).getTime();
this.delta = now - this.lastTime;
this.lastTime = now;
this.updateTime += this.delta;
this.totalTime += this.delta;
this.frames++;
this.updateFrames++;
document.getElementById(fpsID).innerHTML = "FPS Average: " + Math.round(1000 * this.frames / this. totalTime) + " Current: " + Math.round(1000 * this.updateFrames / this.updateTime);
this.updateTime = 0; // reset time
this.updateFrames = 0; // reset frames
}
};
Clock.init('canvas');
</script>
</body>
</html>
Loading…
Cancel
Save