From fdc294069294aa940395446acd0d325b0f33ca89 Mon Sep 17 00:00:00 2001 From: 5iux <13775651+5iux@users.noreply.github.com> Date: Mon, 23 Mar 2020 13:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 112 ++++++++++++--------------- sou.js | 44 +---------- style.css | 224 ++++++++++-------------------------------------------- 3 files changed, 92 insertions(+), 288 deletions(-) diff --git a/index.php b/index.php index ebd9988..05b5667 100644 --- a/index.php +++ b/index.php @@ -8,10 +8,10 @@ if ($t=="b"){ echo''; }else if($t=="g"){ - echo''; + echo''; }else{ //默认谷歌 - echo''; + echo''; } }; ?> @@ -35,39 +35,10 @@ 简单搜索 " rel="stylesheet"> - + - - - - @@ -86,17 +57,14 @@ function gtag(){dataLayer.push(arguments);}
  • ACFUN
  • 哔哩哔哩
  • 影视搜索
  • - -
  • 设计视觉
  • -
  • 设计导航
  • -
  • Pinterest
  • -
  • Behance
  • -
  • Dribbble
  • -
  • 花瓣
  • -
  • 站酷
  • -
  • 阿里图标
  • -
  • IconFinder
  • -
  • 优设教程
  • + +
  • 邮箱
  • +
  • Gmail
  • +
  • Hotmail
  • +
  • 网易邮箱
  • +
  • 新浪邮箱
  • +
  • QQ邮箱
  • +
  • 阿里邮箱
  • 社交
  • 微博
  • @@ -119,6 +87,17 @@ function gtag(){dataLayer.push(arguments);}
  • 亚马逊
  • 当当
  • 吾爱淘
  • + +
  • 设计视觉
  • +
  • 设计导航
  • +
  • Pinterest
  • +
  • Behance
  • +
  • Dribbble
  • +
  • 花瓣
  • +
  • 站酷
  • +
  • 阿里图标
  • +
  • IconFinder
  • +
  • 优设教程
  • 搜索引擎
  • Google
  • @@ -131,14 +110,6 @@ function gtag(){dataLayer.push(arguments);}
  • 秘迹
  • 多吉
  • seeres
  • - -
  • 邮箱
  • -
  • Gmail
  • -
  • Hotmail
  • -
  • 网易邮箱
  • -
  • 新浪邮箱
  • -
  • QQ邮箱
  • -
  • 阿里邮箱
  • 工具
  • Miku工具
  • @@ -169,17 +140,32 @@ function gtag(){dataLayer.push(arguments);}
  • Swiper
  • -
    -
    -
    -
    -
      -
      -
      -
        -
        -
        - +
        +
        + + +
        @@ -202,7 +188,7 @@ function gtag(){dataLayer.push(arguments);} 作者:D.Young 主页:https://yyv.me/ github:https://github.com/5iux/sou -日期:2020-03-16 +日期:2020-03-23 版权所有,请勿删除 --> diff --git a/sou.js b/sou.js index d5705e8..df1bfbc 100644 --- a/sou.js +++ b/sou.js @@ -2,7 +2,7 @@ 作者:D.Young 主页:https://yyv.me/ github:https://github.com/5iux/sou -日期:2020-03-16 +日期:2019-07-26 版权所有,请勿删除 */ @@ -55,45 +55,3 @@ $(document).ready(function() { }); }); - -/*天气插件开始 -天气插件api请在 -申请地址:和风天气-https://dev.heweather.com/ -*/ -$.ajax({ - url: 'https://free-api.heweather.net/s6/weather/?location=auto_ip&key=此处请填入自己申请的KEY', - dataType: 'json', - error: function() { - console.log('天气插件网络错误!'); - }, - success: function(res) { - //判断夜晚 - var now = new Date(), - hour = now.getHours(); - if (hour < 18) { myday = "d"; } else { myday = "n"; } - //天气 - $('.mywth').append(res.HeWeather6[0].basic.location + ' ' + res.HeWeather6[0].now.cond_txt + ' ' + res.HeWeather6[0].now.tmp + '℃ ' + res.HeWeather6[0].now.wind_dir); - - $('.wea_hover').css('background-image', 'url(https://cdn.heweather.com/img/plugin/190516/bg/sticker/' + res.HeWeather6[0].now.cond_code + myday + '.png)'); - //今日天气 - $('.wea_top').append('' + res.HeWeather6[0].basic.location + ' ' + res.HeWeather6[0].update.loc + ' 更新 ' + res.HeWeather6[0].now.tmp + '℃' + res.HeWeather6[0].now.cond_txt + '紫外线指数:' + res.HeWeather6[0].lifestyle[5].brf + '
        相对湿度:' + res.HeWeather6[0].now.hum + '%
        ' + res.HeWeather6[0].now.wind_dir + ':' + res.HeWeather6[0].now.wind_sc + '级
        ' + res.HeWeather6[0].lifestyle[3].txt + ''); - //今日指数 - $('.wea_con ul').append('
      • 舒适度指数
        ' + res.HeWeather6[0].lifestyle[0].brf + '
      • '); - $('.wea_con ul').append('
      • 穿衣指数
        ' + res.HeWeather6[0].lifestyle[1].brf + '
      • '); - $('.wea_con ul').append('
      • 感冒指数
        ' + res.HeWeather6[0].lifestyle[2].brf + '
      • '); - $('.wea_con ul').append('
      • 运动指数
        ' + res.HeWeather6[0].lifestyle[3].brf + '
      • '); - $('.wea_con ul').append('
      • 旅游指数
        ' + res.HeWeather6[0].lifestyle[4].brf + '
      • '); - $('.wea_con ul').append('
      • 紫外线指数
        ' + res.HeWeather6[0].lifestyle[5].brf + '
      • '); - $('.wea_con ul').append('
      • 洗车指数
        ' + res.HeWeather6[0].lifestyle[6].brf + '
      • '); - $('.wea_con ul').append('
      • 空气指数
        ' + res.HeWeather6[0].lifestyle[7].brf + '
      • '); - - //未来3天天气 - $('.wea_foot ul').append('
      • ' + res.HeWeather6[0].daily_forecast[0].date + '

        ' + res.HeWeather6[0].daily_forecast[0].cond_txt_d + '
        ' + res.HeWeather6[0].daily_forecast[0].tmp_min + '°/' + res.HeWeather6[0].daily_forecast[0].tmp_max + '°' + '
      • '); - - $('.wea_foot ul').append('
      • ' + res.HeWeather6[0].daily_forecast[1].date + '

        ' + res.HeWeather6[0].daily_forecast[1].cond_txt_d + '
        ' + res.HeWeather6[0].daily_forecast[1].tmp_min + '°/' + res.HeWeather6[0].daily_forecast[1].tmp_max + '°' + '
      • '); - - $('.wea_foot ul').append('
      • ' + res.HeWeather6[0].daily_forecast[2].date + '

        ' + res.HeWeather6[0].daily_forecast[2].cond_txt_d + '
        ' + res.HeWeather6[0].daily_forecast[2].tmp_min + '°/' + res.HeWeather6[0].daily_forecast[2].tmp_max + '°' + '
      • '); - } -}); - -/*天气插件结束*/ \ No newline at end of file diff --git a/style.css b/style.css index a608c16..421c9ed 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ 作者:D.Young 主页:https://yyv.me/ github:https://github.com/5iux/sou -日期:2020-03-16 +日期:2019-07-11 版权所有,请勿删除 */ @@ -180,7 +180,7 @@ a { background-size: cover; background-repeat: no-repeat; background-position: center; - background-color: #fff; + background-color: #fff; transform: scale(0.7); } @@ -332,7 +332,7 @@ a { font-size: 12px; } -.list ul li a i { +/*.list ul li a i { margin-right: 5px; margin-left: 15px; transition: 0.2s all linear; @@ -341,7 +341,7 @@ a { .list ul li a i.iconfont { font-size: 14px; } - +*/ .list ul li:hover a { color: #fff; background-color: #29f; @@ -349,10 +349,10 @@ a { box-shadow: 0 3px 3px rgba(0, 40, 70, .3); } -.list ul li:hover a i { +/*.list ul li:hover a i { color: #fff !important; } - +*/ .list ul li.title { width: 100%; height: 40px; @@ -366,11 +366,11 @@ a { font-weight: bold; } -.list ul li.title i { +/*.list ul li.title i { color: #29f; margin-right: 5px; font-weight: normal; -} +}*/ .mywth { position: absolute; @@ -381,220 +381,74 @@ a { line-height: 20px; cursor: pointer; z-index: 100000; + height: 22px; } -.mywth .wea { - display: inline-block; - height: 18px; - vertical-align: middle; - padding-bottom: 3px; -} - -.mywth .wea_hover { - width: 400px; - padding: 25px 10px; - position: absolute; - z-index: 100000; - font-size: 12px; - line-height: 20px; - left: 0; - top: 30px; - box-shadow: 5px 5px 5px 0 rgba(33, 150, 243, 0.3); - border-radius: 15px; - /* background: #fff; - background: linear-gradient(45deg, #549aff,#602fff);*/ - background-size: cover; - background-repeat: no-repeat; - background-position: center; - color: #fff; - visibility: hidden; - opacity: 0; - transition: 0.5s all; -} - -.mywth:hover .wea_hover { - visibility: visible; - opacity: 1; -} - -.wea_in { - position: relative; - float: left; - width: calc(100% - 20px); - margin-left: 10px; -} - -.wea_top span { - display: block; - float: left; - line-height: 20px; -} - -.wea_top span.city { - width: 100%; - line-height: 26px; -} - -.wea_top span.city b { - display: inline-block; - float: left; - background: #fd0; - font-size: 14px; - padding: 0 10px; - border-radius: 13px; - color: #06b; - margin-right: 5px; -} - -.wea_top span.img { - width: 50px; - height: 120px; -} - -.wea_top span.tem { - width: 120px; - height: 120px; - text-align: center; -} - -.wea_top span.tem b { - display: block; - width: 100%; - height: 40px; - font-weight: lighter; - font-size: 32px; - line-height: 40px; - margin-top: 30px; -} - -.wea_top span.air { - height: 40px; - width: 120px; - margin-top: 30px; -} - -.wea_top span.air_tips { - text-indent: 15px; -} - -.wea_con { - margin: 20px 10px; - position: relative; - float: left; -} - -.wea_con ul { - width: 100%; - margin-left: 1px; -} - -.wea_con ul li { - float: left; - width: calc(25% - 12px); - font-size: 12px; - overflow: hidden; - border: 1px solid #eee; - padding: 0 5px; - font-size: 12px; - line-height: 25px; - font-weight: bold; - text-align: center; - position: relative; - margin: 0 -1px -1px 0; -} - -.wea_con ul li b { - color: #fd0; - font-size: 14px; -} - -.wea_con ul li:hover { - background: rgba(255, 255, 255, 0.3); - color: #000; -} - -.wea_con ul li i { - display: none; - font-size: 12px; - font-weight: normal; - font-style: normal; - line-height: 16px; - margin: 5px 0; -} - -.wea_foot ul { - position: relative; - float: left; - width: 100%; -} - -.wea_foot ul li { - float: left; - width: 33.3%; +svg.icon { + width: 14px; + height: 14px; + margin: 0 5px 0 8px; + vertical-align: -0.15em; + fill: currentColor; overflow: hidden; - text-align: center; - font-weight: bold; -} - -.wea_foot ul li img { - display: inline-block; - vertical-align: center; - height: 30px; - margin: 5px; } -.wea_foot ul li b { - color: #0f0; - font-weight: normal; -} - -.wea_foot ul li i { - font-weight: normal; - font-style: normal; +.list ul li.title svg.icon { + width: 20px; + height: 20px; } @media (max-width: 640px) { .con { top: 0px; } + .con .shlogo { width: 320px; height: 100px; } + .con .sou form .wd:focus { background: #f1f1f1; box-shadow: none; border-color: #ccc } + .con .sou form button { border-radius: 25px; } + #menu.on { right: 270px; } + .list { width: 227px; } + .list ul { width: 220px; } + .con .sou ul li { width: 100px; font-size: 12px; text-indent: 30px; } + .home, #menu { top: 5px; } + .mywth { color: #777; left: 10px; top: 20px; + overflow: hidden; + } - .mywth .wea_hover { - display: none; - } + .mywth.hidden { display: none; } @@ -605,9 +459,11 @@ a { margin: 0; top: 0px; } + .con .sou form .wd { text-indent: 50px; } + .con .sou form:after { content: ""; display: block; @@ -620,9 +476,11 @@ a { border-radius: 50%; overflow: hidden; } + .con .shlogo { display: none; } + .home, #menu, .mywth, @@ -630,30 +488,32 @@ a { display: none; } } -@media (prefers-color-scheme: dark) -{ + +@media (prefers-color-scheme: dark) { body { background-color: #162035; } + .mywth { color: #bbb; } - .mywth .wea_hover{ - box-shadow: none; - } - .con .sou ul li{ + + .con .sou ul li { background: #293550; color: #fff; } + .con .sou form .wd:focus { background: #293550; border: 1px solid #162035; } + .con .sou form .wd { border: 1px solid #293550; color: #bbb; } } + ::-webkit-scrollbar { width: 6px; height: 6px;