first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3888619_v16hmdbwua.css">
<style>
body,
ul,
li {
margin: 0;
padding: 0;
list-style: none;
}
.mian {
background-image: url(https://imgcps.jd.com/img-cubic/creative_server_cia_jdcloud/v2/2000366/53763144452/FocusFullshop/CkNqZnMvdDEvMjEzNjYxLzM4LzI1MzM2LzUxNTEyLzYzZTYyZjRhRmZlNTdiMzA2Lzg3MWFlNTZjMjUwNjhkYmIuanBnEgo5OTktdHlfMF8xMAE47ot6WIT2oaTIAQ/cr/s/q.jpg);
background-size: cover;
width: 590px;
height: 470px;
}
.mian {
position: relative;
}
.nav,
.mian ul {
position: absolute;
}
.nav {
top: 50%;
transform: translateY(-50%);
width: 100%;
}
.nav i {
color: rgba(255, 255, 255, .8);
font-size: 20px;
}
.right {
float: right;
}
.left {
float: left;
}
.mian ul li {
float: left;
height: 10px;
width: 10px;
background-color: aliceblue;
border-radius: 100%;
margin-right: 4px;
}
.mian ul {
bottom: 20px;
left: 20px;
}
</style>
</head>
<body>
<div class="mian">
<div class="nav">
<i class="iconfont icon-gengduo-copy"></i>
<i class="iconfont icon-gengduo right"></i>
</div>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,25 @@
.main {
background: #96b97d;
width: 100%;
height: 38px;
}
.center {
width: 1280px;
height: 100%;
margin: 0 auto;
}
.main .center ul li {
float: left;
line-height: 38px;
margin-right: 20px;
}
.main .center ul li a {
color: #fff;
}
.main .center ul li a:hover {
color: #e3efd9;
}

View File

@@ -0,0 +1,9 @@
/* 清除浏览器默认样式的css代码 */
body,ul,input,li,a{
margin: 0;
padding: 0;
border: none;
outline: none;
list-style: none;
text-decoration: none;
}

View File

@@ -0,0 +1,135 @@
.main {
height: 58px;
width: 100%;
background-color: #ffffff;
}
.main .center {
width: 1190px;
margin: 0 auto;
height: 58px;
}
.logo img {
width: 138.69px;
height: 42px;
padding-top: 8px;
}
.logo .city i {
font-size: 20px;
vertical-align: middle;
}
.logo .city .city_name {
font-size: 12px;
color: #333;
}
.logo .city a {
font-size: 12px;
color: #32be4a;
}
.logo .menu li {
float: left;
margin-right: 40px;
}
.logo .menu a {
color: #333;
}
.logo .menu li .after {
color: #32be4a;
font-weight: 700;
position: relative;
}
.logo .menu li .after::after {
background: #32be4a;
content: "";
width: 23px;
height: 3px;
position: absolute;
position: absolute;
bottom: -18px;
left: 50%;
transform: translateX(-50%);
}
.logo .city,
.menu {
line-height: 58px;
}
.logo img,
.city {
margin-right: 50px;
}
.logo .city a {
margin-left: 10px;
}
.list li {
float: left;
margin-left: 40px;
line-height: 58px;
position: relative;
}
.list li a:hover .d_menu {
display: block;
}
.list li .icon-shouji {
font-size: 20px;
vertical-align: bottom;
}
.list li span {
color: #333;
font-size: 15px;
}
.list li .icon-xiala {
font-weight: 700;
}
.list li .d_menu {
padding: 18px 25px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px 0 rgb(0 0 0 / 10%);
position: absolute;
top: 38px;
left: 50%;
transform: translateX(-50%);
display: none;
}
.list li .d_menu img {
width: 100px;
height: 100px;
}
.list li .d_menu .down {
color: #333;
font-size: 16px;
font-weight: 700;
text-align: center;
line-height: 10px;
}
.list li .d_menu .app {
color: #333;
font-weight: 400;
font-size: 14px;
text-align: center;
}

View File

@@ -0,0 +1,44 @@
.main {
width: 716px;
height: 42px;
}
.search_f {
width: 600px;
height: 100%;
position: relative;
}
.search_f input {
width: 100%;
height: 100%;
background-color: #fff;
border: 1px solid #39bc30;
box-sizing: border-box;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
padding-left: 40px;
}
.search_f img{
position: absolute;
width: 16px;
height: 16px;
top: 50%;
transform: translateY(-50%);
padding-left: 15px;
}
.search_button {
width: 116px;
height: 100%;
background-color: #39bc30;
color: #fff;
font-size: 16px;
font-weight: 700;
line-height: 42px;
text-align: center;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./clear.css">
<link rel="stylesheet" href="./public.css">
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="main hidden">
<div class="search_f left">
<img src="./sousuo.png" alt="">
<input placeholder="请输入职位名称或公司" type="text">
</div>
<div class="search_button left">
搜索
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,17 @@
/* 公共样式的css代码 */
.left {
float: left;
}
.right {
float: right;
}
.clear {
clear: both;
}
.hidden {
overflow: hidden;
}
.reset {
line-height: 1;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>菜鸟教程头部</title>
<link rel="stylesheet" href="./clear.css">
<link rel="stylesheet" href="./public.css">
<link rel="stylesheet" href="./cainiao.css">
</head>
<body>
<div class="main">
<div class="center">
<ul>
<li>
<a href="">首页</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
<li>
<a href="">菜鸟笔记</a>
</li>
</ul>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./clear.css">
<link rel="stylesheet" href="./public.css">
<link rel="stylesheet" href="./header.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3888619_ecv5rpjc115.css">
</head>
<body>
<div class="main">
<div class="center">
<div class="left logo">
<img class="left" src="https://img.58cdn.com.cn/arthurupload/hrg-fe/zp-ganji/pc/pc-header-logo-2.png"
alt="">
<div class="city left">
<i class="iconfont icon-zuobiao"></i>
<span class="city_name">合肥</span>
<a href="">[切换城市]</a>
</div>
<ul class="left menu">
<li>
<a class="after" href="">首页</a>
</li>
<li>
<a href="">职位</a>
</li>
<li>
<a href="">公司</a>
</li>
</ul>
</div>
<ul class="right list">
<li>
<a href="">
<i class="iconfont icon-shouji"></i>
<span>手机上赶集</span>
<i class="iconfont icon-xiala"></i>
<div class="d_menu">
<div class="down">扫码下载</div>
<div class="app">赶集直招APP</div>
<img src="https://img.58cdn.com.cn/arthurupload/hrg-fe/zp-ganji/pc/gj-qrcode-1.png" alt="">
</div>
</a>
</li>
<li>
<a href="">
<i class="iconfont icon-shouji"></i>
<span>我要找人</span>
<i class="iconfont icon-xiala"></i>
<div class="d_menu">
<div class="down">扫码下载</div>
<div class="app">赶集直招APP</div>
<img src="https://img.58cdn.com.cn/arthurupload/hrg-fe/zp-ganji/pc/gj-qrcode-1.png" alt="">
</div>
</a>
</li>
</ul>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,8 @@
body,ul,input,li,a{
margin: 0;
padding: 0;
border: none;
outline: none;
list-style: none;
text-decoration: none;
}

View File

@@ -0,0 +1,289 @@
.header_menu {
height: 26px;
background: #f2f2f2;
border-bottom: 1px solid #e5e5e5;
}
.center {
width: 1190px;
margin: 0 auto;
}
.header_left li,
.header_right li {
float: left;
line-height: 26px;
}
.header_left li i{
font-size: 12px;
}
.header_left li a,
.header_right li a{
color: #999;
font-size: 12px;
}
.header_left li:first-child{
margin-right: 20px;
}
.header_left li:last-child{
margin-left: 20px;
}
.header_right li{
position: relative;
margin-left: 10px;
margin-right: 14px;
}
.header_right li i{
font-size: 12px;
color: #999;
}
.header_right li .icon-sanjiaoyou{
transition: all 0.3s;
display: inline-block;
transform: scale(0.7);
}
.header_right li:hover .icon-sanjiaoyou{
transform: rotate(180deg) scale(0.7);
}
.header_right li:first-child:hover .drop_menu{
display: block;
}
.header_right .shoucang:hover .drop_menu1{
display: block;
}
.header_right .drop_menu,.header_right .drop_menu1{
position: absolute;
width: 96px;
height: 57px;
background: #fff;
border: 1px solid rgb(238,238,238);
padding: 8px 10px;
box-sizing: border-box;
line-height: 1.2;
z-index: 9999;
display: none;
}
.header_logo{
height: 120px;
border-bottom: 1px solid #7a45e5;
}
.header_logo .logo_left{
line-height: 120px;
}
.header_logo .logo_left .img_l{
width: 116px;
height: 40px;
float: left;
margin-top: 36px;
margin-right: 20px;
}
.header_logo .logo_left .img_r{
width: 175px;
height: 16px;
}
.header_logo .logo_right{
margin-top: 36px;
}
.header_logo .logo_right input{
width: 347px;
height: 36px;
border: 3px solid #7a45e5;
box-sizing: border-box;
}
.header_logo .logo_right .button{
width: 90px;
height: 36px;
text-align: center;
line-height: 36px;
color: #fff;
font-size: 16px;
background: linear-gradient(to right,#7a45e5 20%,#b23cef 80%);
float: right;
}
.content .list{
height: 461px;
position: relative;
top: -39px;
}
.content .list .list_left{
height: 100%;
width: 200px;
}
.list .list_left ul{
height: 420px;
background: #333;
}
.list .list_left .picture{
margin-bottom: 9px;
padding-top: 15.5px;
}
.list .list_left picture img{
width: 24px;
height: 24px;
margin-right: 10px;
}
.list .list_left .picture span{
font-size: 16px;
color: #fff;
font-weight: 700;
}
.list .list_left .font{
}
.list .list_left .font a{
color: #fff;
font-size: 12px;
}
.list .list_left ul li{
height: 84px;
color: #fff;
width: 160px;
margin-left: 20px;
font-size: 0;
border-bottom: 1px dotted #545454;
box-sizing: border-box;
}
.content .list .list_left .picture img{
width: 24px;
height: 24px;
margin-right: 10px;
}
.content .list .list_left .title{
font-size: 14px;
color: #fff;
padding-left: 20px;
background: linear-gradient(90deg,#7a45e5 20%,#b23cef 80%);
width: 200px;
box-sizing: border-box;
line-height: 38px;
}
.list_right{
width: 990px;
height: 38px;
}
.list_right .title {
padding-left: 46px;
box-sizing: border-box;
line-height: 38px;
}
.list_right .title li {
float: left;
margin-right: 40px
}
.list_right .title li .active {
color: #7a45e5;
font-weight: 600;
}
.list_right .title li a{
font-size: 14px;
color: #333;
}
.banner .text {
text-align: center;
width: 250px;
}
.banner .text .tm_text{
margin-top: 30px;
font-size: 18px;
color: rgb(122, 69, 229);
font-weight: bold;
}
.banner .text .tm_desc{
font-size: 20px;
margin-top: 10px;
font-weight: bold;
color: rgb(122, 69, 229);
}
.banner .text .tm_fg{
margin: 20px 0;
}
.banner .text .code{
display: block;
margin: 0 auto;
}
.banner .text .tm_t{
font-size: 14px;
font-weight: bold;
color: rgb(51, 51, 51);
margin-bottom: 8px;
margin-top: 10px;
}
.banner .text .tm_s{
font-size: 12px;
color: rgb(165, 165, 165);
}
.double{
width: 685px;
height: 502px;
background: #fff;
/* background: #8d8d8d; */
box-shadow: 0 3px 10px rgb(0 0 0 / 30%);
padding: 30px 0 4px 30px;
z-index: 999;
min-height: 436px;
}
.double .form{
display: inline-block;
vertical-align: top;
width: 313px;
/* overflow: hidden; */
}
.double .form > li {
height: 140px;
margin-right: 22px;
margin-bottom: 26px;
}
/* .double .form .block{
display: inline-block;
} */
.double .form > li hr{
border: 0;
border-top: 1px solid #333;
margin: 10px 0;
}
.double .form > li .text{
color: #333;
font-size: 12px;
line-height: 12px;
font-weight: 700;
}
/* .double .form li ul li{
display: inline-block;
} */
.double .form > li ul li a{
padding: 0 7px 0 10px;
margin-top: 10px;
border-left: 1px solid #d9d9d9;
font-size: 12px;
height: 12px;
line-height: 12px;
color: #666;
}
.list_left ul li a:hover .double{
display: block;
}
.double{
position: relative;
left: 373px;
bottom: 461px;
display: none;
}
.double i{
position: absolute;
right: 9px;
top: 5px;
}

View File

@@ -0,0 +1,396 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>天猫国际</title>
<link rel="stylesheet" href="./clear.css">
<link rel="stylesheet" href="./public.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3888619_bnszs9m7c3t.css">
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="header">
<div class="header_menu">
<div class="center">
<ul class="header_left left">
<li>
<i class="iconfont icon-shouye"></i>
<a href="">天猫首页</a>
</li>
<li>
<a href="">嗯,欢迎来到天猫国际</a>
</li>
<li>
<a href="">请登录</a>
</li>
</ul>
<ul class="header_right right">
<li>
<a href="">我的淘宝</a>
<i class="iconfont icon-sanjiaoyou"></i>
<div class="drop_menu">
<a href="">已买到的宝贝</a>
<a href="">已卖出的宝贝</a>
</div>
</li>
<li>
<i class="iconfont icon-gouwuchekong"></i>
<a href="">购物车</a>
</li>
<li class="shoucang">
<a href="">收藏夹</a>
<i class="iconfont icon-sanjiaoyou"></i>
<div class="drop_menu1">
<a href="">收藏的宝贝</a>
<a href="">收藏的店铺</a>
</div>
</li>
<li>
<i class="iconfont icon-shouji"></i>
<a href="">手机版</a>
</li>
<li>
<a href="">淘宝网</a>
</li>
<li>
<a href="">网页无障碍</a>
</li>
</ul>
</div>
</div>
<div class="header_logo">
<div class="center hidden">
<div class="logo_left left">
<img class="img_l" src="https://img.alicdn.com/tfs/TB1ygW.nsfpK1RjSZFOXXa6nFXa-218-80.png" alt="">
<img class="img_r" src="https://img.alicdn.com/tfs/TB1CFE8OEY1gK0jSZFMXXaWcVXa-349-32.png" alt="">
</div>
<div class="logo_right right">
<input type="text">
<div class="button">搜索</div>
</div>
</div>
</div>
</div>
<div class="content">
<div class="center">
<div class="list">
<div class="list_left left">
<div class="title">
全部商品分类
</div>
<ul>
<li>
<a href="">
<div class="picture">
<img src="https://img.alicdn.com/tps/TB1Bk97JpXXXXcVXFXXXXXXXXXX-48-48.png" alt="">
<span>美妆个护</span>
</div>
<div class="font">
<a href="">面膜 /</a>
<a href="">防晒 /</a>
<a href="">面部护理套装</a>
</div>
</a>
</li>
<li>
<div class="picture">
<img src="https://img.alicdn.com/tps/TB1Bk97JpXXXXcVXFXXXXXXXXXX-48-48.png" alt="">
<span>美妆个护</span>
</div>
<div class="font">
<a href="">面膜 /</a>
<a href="">防晒 /</a>
<a href="">面部护理套装</a>
</div>
</li>
<li>
<div class="picture">
<img src="https://img.alicdn.com/tps/TB1Bk97JpXXXXcVXFXXXXXXXXXX-48-48.png" alt="">
<span>美妆个护</span>
</div>
<div class="font">
<a href="">面膜 /</a>
<a href="">防晒 /</a>
<a href="">面部护理套装</a>
</div>
</li>
<li>
<div class="picture">
<img src="https://img.alicdn.com/tps/TB1Bk97JpXXXXcVXFXXXXXXXXXX-48-48.png" alt="">
<span>美妆个护</span>
</div>
<div class="font">
<a href="">面膜 /</a>
<a href="">防晒 /</a>
<a href="">面部护理套装</a>
</div>
</li>
<li>
<div class="picture">
<img src="https://img.alicdn.com/tps/TB1Bk97JpXXXXcVXFXXXXXXXXXX-48-48.png" alt="">
<span>美妆个护</span>
</div>
<div class="font">
<a href="">面膜 /</a>
<a href="">防晒 /</a>
<a href="">面部护理套装</a>
</div>
</li>
</ul>
</div>
<div class="list_right left">
<ul class="title">
<li><a class="active" href="">首页</a></li>
<li><a href="">全球精选</a></li>
<li><a href="">井口超市</a></li>
<li><a href="">海外直购</a></li>
</ul>
<div class="banner">
<img class="left"
src="https://gw.alicdn.com/imgextra/i3/O1CN01d3hUsb1NFp8DEzwFF_!!6000000001541-0-tps-740-420.jpg_Q75.jpg"
alt="">
<div class="text left">
<div class="tm_text">天猫国际</div>
<div class="tm_desc">TMALL GLOBAL</div>
<img class="tm_fg"
src="https://gw.alicdn.com/tps/TB1tQM6JXXXXXaeXXXXXXXXXXXX-38-11.jpg_Q75.jpg" alt="">
<img class="code"
src="https://gw.alicdn.com/imgextra/i1/O1CN01g3E02H1JOkHYfqBix_!!6000000001019-0-tps-200-200.jpg_Q75.jpg"
alt="">
<div class="tm_t">畅享全球好货</div>
<div class="tm_s">正品保障,破损无忧,晚到必赔!</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="double">
<i class="iconfont icon-cha"></i>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
<ul class="form">
<li>
<div class="text">美妆护肤</div>
<hr>
<ul>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
<li>
<a href="">保湿补水</a>
<a href="">洁面</a>
<a href="">乳液/面霜</a>
<a href="">化妆水</a>
</li>
</ul>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,17 @@
/* 公共样式的css代码 */
.left {
float: left;
}
.right {
float: right;
}
.clear {
clear: both;
}
.hidden {
overflow: hidden;
}
.reset {
line-height: 1;
}

View File

@@ -0,0 +1,8 @@
body,ul,input,li,a{
margin: 0;
padding: 0;
border: none;
outline: none;
list-style: none;
text-decoration: none;
}

View File

@@ -0,0 +1,67 @@
.header{
width: 100%;
height: .9rem;
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.26rem;
box-sizing: border-box;
top: 0;
position: fixed;
border-bottom: 0.01rem solid #e9e9e9;
}
.header .title{
font-family: PingFang-SC-Bold;
font-size: 0.34rem;
color: #010101;
}
.header i{
color: #010101;
}
.content{
margin-top: .9rem;
}
.list{
padding-left: 0.33rem;
}
.list li{
display: flex;
justify-content: space-between;
align-items: center;
height: 1.11rem;
padding-right: 0.35rem;
box-sizing: border-box;
border-bottom: 0.01rem solid #e9e9e9;
}
.list li .list_text{
font-family: PingFang-SC-Medium;
font-size: 0.32rem;
color: #000000;
}
.list li:first-child .list_logo{
align-items: center !important;
}
.list li .list_logo{
display: flex;
align-items: baseline;
}
.list li .list_logo img {
width: 0.64rem;
height: 0.64rem;
border-radius: 100%;
margin-right: 0.15rem;
}
.list li .list_logo i{
color: #bfbfbf;
font-size: .26rem;
}
.list li .list_logo .name{
font-size: 0.28rem;
color: #969696;
}
.list li .list_logo .name_1{
color: #c4c4c4;
font-size: 0.28rem;
}

View File

@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript">
(function (w, d) {
function setSize() {
// 获取屏幕的宽度 375px
var screenWidth = d.documentElement.clientWidth;
// 根据规则计算 html 的font-size数值
var currentFontSize = screenWidth * 100 / 750;
// 修改html上的font-size
d.documentElement.style.fontSize = currentFontSize + 'px';
}
w.addEventListener('resize', setSize);
w.addEventListener('pageShow', setSize)
w.addEventListener('DOMContentLoaded', setSize)
})(window, document)
</script>
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3888619_bnszs9m7c3t.css">
<link rel="stylesheet" href="./clear.css">
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="header">
<i class="iconfont icon-gengduo-copy"></i>
<div class="title">
编辑个人资料
</div>
<div></div>
</div>
<div class="content">
<ul class="list">
<li>
<div class="list_text">头像</div>
<div class="list_logo">
<img src="https://upload.jianshu.io/users/upload_avatars/3343569/6940ee65-036f-4b7a-9935-5915d9b67d14.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96/format/webp" alt="">
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">昵称</div>
<div class="list_logo">
<div class="name">小徐</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">昵称</div>
<div class="list_logo">
<div class="name">小徐</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">用户</div>
<div class="list_logo">
<div class="name">1122112211</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">性别</div>
<div class="list_logo">
<div class="name">女</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">所在地</div>
<div class="list_logo">
<div class="name">安徽省</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
<li>
<div class="list_text">个人介绍</div>
<div class="list_logo">
<div class="name_1">填写个人资料更容易获得关注</div>
<i class="iconfont icon-gengduo"></i>
</div>
</li>
</ul>
</div>
<div class="footer"></div>
</body>
</html>

View File

@@ -0,0 +1,25 @@
@font-face {
font-family: ziti;
src: url("./shangshouzhaocaimaoti.ttf");
}
/* .font{
font-family: ziti;
font-size: 50px;
} */
/* .font .demo {
font-family: ziti;
font-size: 50px;
} */
/* .demo .font{
font-family: ziti;
font-size: 50px;
} */
/* .demo,.font{
font-family: ziti;
font-size: 50px;
} */
.font > .font2{
font-family: ziti;
font-size: 50px;
}

View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css练习</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<!-- <p class="font">你好</p>
<div class="demo">
你好啊
</div> -->
<div class="demo">
你好啊
<p class="font">
你好
<span class="font2">年后呀</span>
</p>
<p class="font_1">你好</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,101 @@
css 写法
三种:
内部写法(写在开始标签内部的)
<p style="color: blue;">这是测试文字</p>
优先级最高
!important 提示css属性的优先级
内联写法(写在head里面的)
外链写法(单独一个css文件)
基本写法:
选择器 {
属性名: 属性值 (可选 !important)
}
组合写法:
选择1 选择器2: 选择 标签1 中 的 标签2 简写:嵌套关系
选择1 > 选择器2: 选择 父标签为1 中 的 2标签 简写:嵌套关系
选择1,选择器2: 同时选中 标签1和2
选择1+选择器2: 选中 紧跟在 标签1 后面 的标签2
选择器: 找人的一种方式
标签选择器
给标签取个名字
类选择器 class (简写 . )
id选择器 简写 #
这个名字是这个网页唯一的
* 通配符选择器
一般用来清除 标签 的 默认样式
伪类选择器
:hover
:focus
:before
:after
路径写法:
绝对路径
相对距离
./ 当前路径开始寻找
../ 从当前位置返回上一级开始寻找
/ 从当前路径的开始位置开始寻找
css属性学习:
display: 可以隐藏显示元素,将块 和 行 进行 相互转换
inline-block 同时具有 行标签 放在一行的特性,还具有块标签可以设置宽高的特殊
inline 行标签
block 块标签
none 隐藏元素
text-decoration: none; 清除下划线
text-shadow:13px 6px 2px #f00 文字加阴影
font-size: 30px; 设置字体大小
font-weight: bold; 加错
color: red; 设置颜色
background: red; 设置背景色
background-size: cover; 保持图像的纵横比并将图像缩放成将完全覆盖背景定位区域的最小大小
background-size: contain;保持图像的纵横比并将图像缩放成将适合背景定位区域的最大大小
background-attachment: fixed;定义滚动时背景图像相对于谁固定
background-image: ;设置背景图
text-align: center; 文字在父元素的宽度内部居中
opacity: 0 ~ 1; 设置透明度
overflow-y: scroll; 按照y轴滚动
line-height 垂直居中 数值和父元素的高度一样
注意:只针对单行文字
父元素内部子元素的居中方式
vertical-align 垂直居中
letter-spacing: 3px; 字符之间的间距(x轴)

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>服务端渲染的网站</title>
</head>
<body>
<h2>服务端渲染的网站</h2>
</body>
</html>

View File

@@ -0,0 +1,31 @@
// var fs = require("fs");
// var data = fs.readFileSync("./笔记.txt")
// console.log(data.toString());
// var axios = require("axios");
// axios.get('http://www.baidu.com/')
// .then(function (response) {
// // handle success
// console.log(response.data);
// })
// .catch(function (error) {
// // handle error
// console.log(error);
// })
// var utils = require("./utils") //这一步导入 有导入一定有到处
// utils.test()
const http = require('http');
const fs = require("fs");
// Create a local server to receive data from
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' });
var data = fs.readFileSync("./index.html")
res.end(data.toString());
});
server.listen(8080);

View File

@@ -0,0 +1,163 @@
{
"name": "3.20nodejs",
"version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "3.20nodejs",
"version": "1.0.1",
"license": "ISC",
"dependencies": {
"axios": "^1.3.4"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "1.3.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.3.4.tgz",
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
}
},
"dependencies": {
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "1.3.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.3.4.tgz",
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
},
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
}
}
}

View File

@@ -0,0 +1,14 @@
{
"name": "3.20nodejs",
"version": "1.0.1",
"description": "nodejs第一天学习",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.3.4"
}
}

View File

@@ -0,0 +1,7 @@
class Utils {
test(){
console.log("test11111111")
}
}
module.exports = new Utils() //module(模块) export(导出)

View File

@@ -0,0 +1,69 @@
nodejs
是JavaScript在 服务器 端的一个 运行环境
作用:
js 就会 成为 后端编程语言
js可以开发桌面端应用
php
java
c#(asp.net)
python
go
c++
js 必须 依赖浏览器才能运行
nodejs 实现核心:
v8 内核(js引擎)
c++ (实现 js 控制操作系统)
能操作数据库(mysql),能提供接口
自带 npm (包[插件]管理工具) 全球最大的插件市场
npm init 初始化一个nodejs新项目
(c)npm install(i) 插件名 插件安装的环境
(c)npm i 根据package.json 里面 的 devDependencies 和 dependencies进行
安装依赖
安装的环境
dev devDependencies 开发阶段 --save-dev -D
dep dependencies 正式阶段 --save -S
全局安装 -g
npm uninstall 插件名
npm update 插件名
npm run 你的启动命令
nodejs 做项目的时候:
package.json
保存项目的一些基本信息(例如 项目名,版本号,作者,启动命令,依赖信息 这些)
插件:
系统提供
你下载
dns 解析服务器
网络上的dns
本地的dns

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul>
</ul>
</body>
<script>
// console.log(window);
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://127.0.0.1:3000/api/json/index")
xhr.send()
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
if(xhr.status == 200){
var data = JSON.parse(xhr.response)
console.log((data.result.list));
data.result.list.forEach(v => {
document.querySelector("ul").innerHTML += `
<li>
<div class="title">${v.title}</div>
<img src="${v.img_src}" alt="">
</li>
`
});
}else{
alert("当前网络状态不假")
}
}
}
</script>
</html>

View File

@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul></ul>
<button>下一页</button>
</body>
<script>
var page = 1;
function ajax() {
var xhr = new XMLHttpRequest();
xhr.open("GET", `http://127.0.0.1:3000/api/json/mechanismList?id=82&page=${page}`)
xhr.send()
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
var data = JSON.parse(xhr.response)
readList(data)
} else {
alert("当前网络状态不假")
}
}
}
}
function readList(list) {
console.log(list.result.data);
list.result.data.forEach(v => {
$("ul").innerHTML += `
<li>
<div class="title">${v.title}</div>
<img src="${v.preview}" alt="">
</li>
`;
});
}
$("button").onclick = () => {
page += 1;
ajax()
}
ajax()
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,42 @@
class Http {
constructor() {
this.xhr = new XMLHttpRequest();
}
get(params) {
var par = ""
for (const key in params.data) {
par += `&${key}=${params.data[key]}`
}
par = par.replace("&", "?")
this.xhr.open("GET", `${params.url}${par}`)
this.xhr.send()
this.ReadyState(params)
}
post(params) {
this.xhr.open("POST", `${params.url}`)
this.xhr.setRequestHeader('Content-Type', 'application/json');
this.xhr.send(JSON.stringify(params.data))
this.ReadyState(params)
}
ReadyState(params) {
this.xhr.onreadystatechange = () => {
if (this.xhr.readyState == 4) {
if (this.xhr.status == 200) {
var data = JSON.parse(this.xhr.response);
params.success(data)
} else {
params.error(this.xhr)
}
}
}
}
}
var http = new Http();

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>封装</title>
<script src="ajaxv1.js"></script>
</head>
<body>
</body>
<script>
http.get({
url: 'http://127.0.0.1:3000/api/json/mechanismList',
data: {
id: 82,
page: 1
}
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
</script>
</html>

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<script>
// var money = 180;
// if ( money > 100){
// console.log("吃好的");
// }else{
// console.log("吃差的");
// }
// for (var a = 1;a <= 10;a++){
// console.log(a);
// }
// 打印数组
// var arr = [1,2,3,4,5,6,7,]
// for(var a = 0;a < arr.length;a++){
// console.log(arr[a]);
// }
// 累加
// var b=0;
// for(var a = 1;a <= 10;a++){
// b += a; (b=b+a)
// }
// console.log(b)
// 9*9
// b 前 a 后
// var c =""
// for(var a = 1;a <= 9;a++){
// for(var b = 1;b <= a;b++){
// c+= `${b} X ${a} =${b * a}` ;
// }
// }
// console.log(c);
</script>
</html>

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<script>
// 实现数累计之和
// function js (){
// var res = 0
// for (var a = 0;a < arguments.length;a++){
// res += arguments[a]
// }
// return res;
// }
// console.log(js(1,2,3));
// 闭包 需要缓存数据 这里实现累加
// bibao 这个内部函数访问 var res = 0 这个外部变量的过程 叫做闭包
// 这时 var res = 0 外部变量被缓存
// cc 就是bibao 外部的js是只执行一次 ,内部的闭包运行多少次都行在进行累加
// function js() {
// var res = 0
// function bibao() {
// for (var a = 0; a < arguments.length; a++) {
// res += arguments[a]
// }
// return res;
// }
// return bibao;
// }
// var cc = js()
// cc(1,2)
// console.log(cc(3,4));
// console.log(cc(5,6));
</script>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>富强</title>
<style>
* {
margin: 0;
padding: 0;
}
span {
user-select: none;
position: fixed;
transition: all 1s;
}
body {
height: 100vh;
}
</style>
</head>
<body>
</body>
<script>
var textArr = ["富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善"];
var i = 0;
$("body").onclick = (e) => {
var { x, y } = e;//解构赋值
var span = document.createElement("span");
span.innerText = textArr[i];
span.style = `
color: hsla(${parseInt(Math.random() * 360)},100%,50%,1);
position: fixed;
left: ${x}px;
top: ${y}px;
`
$("body").appendChild(span) //添加span
//越界处理,数组的下标超过了 数组下标让他重新来
i++
if (i > 11) {
i = 0
}
sport(span,y)
}
function sport(span,y) {
setTimeout(() => {
span.style.top = `${y - 200}px`
}, 200)
setTimeout(() => {
$("body").removeChild(span)//延迟 1250毫秒过后删除
}, 1250)
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<input type="text" placeholder="请输入关键字">
<button>搜索</button>
<ul>
</ul>
</body>
<script>
var keyWordList = [
'今天出太阳了', '太阳很好', '不喜欢js学习',
'js编程很简单', '喜欢很简单的html', '今天不想学习html,只想出去玩',
'今天不想学习css', '今晚出去飙车', '明天出去修车'
];
var newKeyList = []
$("input").oninput = () => {
newKeyList = []
// 这个 newKeyList = [] 写在这里目的实现清空
if ($("input").value.length > 0) {
// 把keyWordList里的值循环
// 里面的if进行判断符合条件的数据 incledes push放进新的数组当中
//v就是数组加下标
keyWordList.forEach(v => {
if (v.includes($("input").value)) {
var text = v.replace($("input").value, `<span style="color:red;">${$("input").value}</span>`)
newKeyList.push(text)
}
})
console.log("符合条件的数据:", newKeyList);
renderUl()
} else {
$("ul").innerHTML = ""
}
}
//渲染页面 第四步把符合条件的 展示 在 ul li 里面给用户看
function renderUl() {
//把新的li插入到ul里
//innerHTML 父元素内部的html
$("ul").innerHTML = ""//这一步用来清空ul里的值,防止数组累计
//将新的获取的newKeyList进行循环
newKeyList.forEach(v => {
$("ul").innerHTML += `<li>${v}</li>`
})
bindLiClick()
}
//第五步
function bindLiClick() {
//这边_ 得到的一个数组
//三次循环给三次li绑定事件
_("ul li").forEach(v => {
v.onclick = () => {
console.dir(v);
$("input").value = v.innerText
SearchBaidu(v.innerText)
}
})
}
//给button绑定点击事件
$("button").onclick = () => SearchBaidu($("input").value)
function SearchBaidu(text) {
open(`https://www.baidu.com/s?wd=${text}`)
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<input type="text" placeholder="请输入关键字">
<button>搜索</button>
<ul>
</ul>
</body>
<script>
var keyWordList = [
'今天出太阳了', '太阳很好', '不喜欢js学习',
'js编程很简单', '喜欢很简单的html', '今天不想学习html,只想出去玩',
'今天不想学习css', '今晚出去飙车', '明天出去修车'
];
// for(i=0;i < keyWordList.length;i++){
// console.log(keyWordList[i]);
// }
var newKeyList = []
$("input").oninput = () => {
newKeyList = []
if ($("input").value.length > 0) {
// console.dir($("input").value);
keyWordList.forEach(v => {
if (v.includes($("input").value)) {
var text = v.replace($("input").value, `<span style="color:red;">${$("input").value}</span>`)
newKeyList.push(text)
}
})
console.log("符合条件的数据:", newKeyList);
renderUl()
}
else {
$("ul").innerHTML = ""
}
}
$("button").onclick = () => { SearchBaidu($("input").value) }
function renderUl() {
$("ul").innerHTML = ""
newKeyList.forEach(v => {
$("ul").innerHTML += `<li>${v}</li>`
})
bindLiClick()
}
function bindLiClick() {
_("ul li").forEach(v => {
v.onclick = () => {
console.log(v);
$("input").value = v.innerText
SearchBaidu(v.innerText)
}
})
}
function SearchBaidu(text) {
open(`https://www.baidu.com/s?wd=${text}`)
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,176 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
img {
width: 70px;
height: 90px;
position: fixed;
}
body {
height: 100vh;
}
.alert {
width: 100%;
height: 100%;
position: fixed;
z-index: 999;
display: none;
}
.zz {
width: 100%;
height: 100%;
background: #000000a8;
position: fixed;
z-index: 1;
}
.text {
width: 300px;
height: 250px;
background: #fff;
position: fixed;
z-index: 2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 10px;
padding: 11px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.text .title {
height: 40px;
display: flex;
align-items: center;
border-bottom: 1px solid #d5d5d5;
}
.text .close {
position: absolute;
right: 10px;
top: 4px;
font-size: 20px;
cursor: pointer;
user-select: none;
}
.text .content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
}
</style>
</head>
<body>
<div class="alert">
<div class="zz"></div>
<div class="text">
<div class="close"> x </div>
<div class="title">恭喜中奖</div>
<div class="content"></div>
</div>
</div>
</body>
<script>
var { clientWidth, clientHeight } = document.body;
var offsetLeft = clientWidth - 70, gId = null, gImg = null;
function createdHB() {
var randomLeft = Math.random() * offsetLeft;
var img = document.createElement("img");
img.src = "./hb.png";
img.onclick = () => {
gImg = img;
probability()
$(".alert").style.display = "block"
_("img").forEach(v => clearInterval(v.intervalId))
clearInterval(gId)
}
img.style = `
left: ${randomLeft}px;
top: -90px;
`;
$("body").appendChild(img)
sport(img)
}
function sport(img) {
img.intervalId = setInterval(() => {
var oldTop = Number(img.style.top.replace("px", ""));
var newTop = oldTop + 1
img.style.top = `${newTop}px`
if (newTop > clientHeight) {
$("body").removeChild(img);
clearInterval(img.intervalId)
}
}, 10);
}
$(".text .close").onclick = () => {
$(".alert").style.display = "none"
$("body").removeChild(gImg);
_("img").forEach(v => sport(v))
auto()
}
function auto() {
gId = setInterval(() => {
createdHB()
}, 500)
}
function probability() {
var probabilityNums = Number((Math.random() * 10).toFixed(4))
if (probabilityNums < 0.0002) {
$(".content").innerText = "恭喜中得一等奖!"
} else if (probabilityNums > 0.0001 && probabilityNums < 8) {
$(".content").innerText = "恭喜中得三等奖!"
} else {
$(".content").innerText = "恭喜中得二等奖!"
}
}
auto()
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js

View File

@@ -0,0 +1,29 @@
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

View File

@@ -0,0 +1,14 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

View File

@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

View File

@@ -0,0 +1,21 @@
# vuecli2xstudy
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

View File

@@ -0,0 +1,41 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})

View File

@@ -0,0 +1,54 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,101 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View File

@@ -0,0 +1,22 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

View File

@@ -0,0 +1,98 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@c': resolve('src/components/'),
'@page': resolve('src/page/'),
'@config': resolve('src/config/'),
'@http': resolve('src/http/'),
'@service': resolve('src/service/'),
'@utils': resolve('src/utils/'),
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View File

@@ -0,0 +1,95 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

View File

@@ -0,0 +1,145 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

View File

@@ -0,0 +1,7 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})

View File

@@ -0,0 +1,84 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/api': { //使用"/api"来代替
target: 'http://127.0.0.1:3000/api/json', //接口域名
changeOrigin: true, //改变源
pathRewrite: {
'^/api': '' //路径重写
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View File

@@ -0,0 +1,4 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>vuecli2xstudy</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,74 @@
{
"name": "vuecli2xstudy",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.19.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

View File

@@ -0,0 +1,19 @@
<template>
<div id="app">
<router-link to="/">首页</router-link>
<router-link to="/about">我的</router-link>
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,15 @@
<template>
<div class="footer">
底部
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@@ -0,0 +1,29 @@
export default {
devBaseUrl: 'http://127.0.0.1:3000/api/json',
testBaseUrl: 'http://127.0.0.1:3000/test/api/json',
prodBaseUrl: 'http://127.0.0.1:3000/prod/api/json',
apiList:{
home: '/index',
},
checkStage: function () {
switch (process.env.NODE_ENV) {
case "development":
return this.devBaseUrl;
break;
case "test":
return this.testBaseUrl;
break;
case "production":
return this.prodBaseUrl;
break;
default:
break;
}
},
}

View File

@@ -0,0 +1,35 @@
import http from "axios";
import config from "@config/"
class HTTP {
constructor(){
this.instance = http.create({
baseURL: config.checkStage(),
timeout: 3000,
headers: {
'Content-Type': 'application/json;charset:utf-8;'
}
});
// this.interceptors()
}
async get(par){
return await this.instance.get(par.url, {
params: par.data,
headers: Object.assign({
token: `${localStorage.getItem("token")}`
}, par.headers)
})
}
async post(){
return await this.instance.post(par.url,par.data, {
headers: Object.assign({
token: `${localStorage.getItem("token")}`
}, par.headers)
})
}
}
export default new HTTP()

View File

@@ -0,0 +1,25 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import service from './service/_'
import footer from '@/components/footer'
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
Vue.use(Toast);
Vue.component('v-footer',footer)
Vue.config.productionTip = false
Vue.prototype.$http = service
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,28 @@
<template>
<div class="about">
<h2>{{ title }}</h2>
</div>
</template>
<script>
export default {
data () {
return {
title: '我的'
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,38 @@
<template>
<div class="home">
<h2>{{ title }}</h2>
<v-footer></v-footer>
</div>
</template>
<script>
export default {
data () {
return {
title: '首页'
}
},
created() {
this.getData()
},
methods: {
async getData(){
let res = await this.$http.index.home()
console.log(res);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,22 @@
import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import HomeComponent from '@page/home'
import AboutComponent from '@page/about'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: HomeComponent
},
{
path: '/about',
name: 'about',
component: AboutComponent
}
]
})

View File

@@ -0,0 +1,7 @@
import IndexService from "./indexService"
import CarService from "./carService"
export default {
index: new IndexService(),
car: new CarService(),
}

View File

@@ -0,0 +1,16 @@
import http from "@http/"
import config from "@config/"
class CarexService {
async index(data = {}, headers = {}) {
return await http.get({
url: config.apiList.index,
data,
headers
})
}
}
export default CarexService

View File

@@ -0,0 +1,16 @@
import http from "@http/"
import config from "@config/"
class IndexService {
async home(data = {}, headers = {}) {
return await http.get({
url: config.apiList.home,
data,
headers
})
}
}
export default IndexService

View File

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vue练习</title>
</head>
<body>
<div class="app">
<h2>{{message}}</h2>
<a v-bind:href="aParams.href">{{aParams.title}}</a>
<ul>
<li v-for="v,i in newsList" :key="i">{{i}} |{{v.title}}</li>
</ul>
<div v-if="vip == 0">普通</div>
<div v-else-if="vip == 1">会员</div>
<div v-else>超级会员</div>
<input v-model="userName" type="text" placeholder="输入用户名">
<input v-model="userPwd" type="password" placeholder="输入密码">
<button @click="Login" >登录</button>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
<script>
var vm = new Vue({
el:'.app',
data:{
message: '我的第一次vue',
vip: 2,
userPwd: '',
userName: '',
aParams: {
title: '点击我',
href: 'https://www.baidu.com/'
},
newsList: [
{ id: 1, title: '新闻1', content: '<h2>你好1</h2>' },
{ id: 2, title: '新闻3', content: '<h2>你好2</h2>' },
{ id: 3, title: '新闻4', content: '<h2>你好3</h2>' }
]
},
methods: {
Login() {
console.log("登录");
// console.log("用户登录:", this.userPwd, this.userName);
},
test() {
console.log("test");
}
},
})
</script>
</html>

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
.title {
display: flex;
}
.title li {
margin-right: 20px;
}
.title .active {
color: red;
}
.content li {
display: none;
}
.content .active {
display: block;
}
</style>
</head>
<body>
<div class="app">
<ul class="title">
<li v-for="v,i in tabList"
:class=" i == index ? 'active' : '' "
@click=" index = i "
>{{ v.title }}</li>
</ul>
<ul class="content">
<li v-for="v,i in tabList" :class="i == index ? 'active' : '' ">{{ v.content }}</li>
</ul>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
<script>
new Vue({
el: '.app',
data: {
index: 0,
tabList: [
{
title: '社会',
content: "社会 的内容"
},
{
title: '体育',
content: "体育 的内容"
},
{
title: '军事',
content: "军事 的内容"
},
{
title: '科技',
content: "科技 的内容"
},
]
},
})
</script>
</html>

View File

@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>router</title>
</head>
<body>
<div id="app">
<h1>Hello App!</h1>
<p>
<!-- 使用 router-link 组件来导航. -->
<!-- 通过传入 `to` 属性指定链接. -->
<!-- <router-link> 默认会被渲染成一个 `<a>` 标签 -->
<router-link to="/foo">Go to Foo</router-link>
<router-link to="/bar">Go to Bar</router-link>
</p>
<!-- 路由出口 -->
<!-- 路由匹配到的组件将渲染在这里 -->
<router-view></router-view>
</div>
</body>
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router@3/dist/vue-router.js"></script>
<script>
// 1. 定义 (路由) 组件。
// 可以从其他文件 import 进来
const Foo = { template: '<div>foo</div>' }
const Bar = { template: '<div>bar</div>' }
// 2. 定义路由
// 每个路由应该映射一个组件。 其中"component" 可以是
// 通过 Vue.extend() 创建的组件构造器,
// 或者,只是一个组件配置对象。
// 我们晚点再讨论嵌套路由。
const routes = [
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar }
]
// 3. 创建 router 实例,然后传 `routes` 配置
// 你还可以传别的配置参数, 不过先这么简单着吧。
const router = new VueRouter({
routes // (缩写) 相当于 routes: routes
})
// 4. 创建和挂载根实例。
// 记得要通过 router 配置参数注入路由,
// 从而让整个应用都有路由功能
const app = new Vue({
el: '#app',
router
})
// .$mount('#app')
</script>
</html>

View File

@@ -0,0 +1,90 @@
* {
margin: 0;
padding: 0;
list-style: none;
}
.list img {
width: 100px;
}
.preview {
width: 100vw;
height: 100vh;
position: absolute;
left: 0;
top: 0;
z-index: 999;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.preview .zz {
width: 100%;
height: 100%;
background: #000000c4;
z-index: -1;
position: absolute;
}
.preview .preview_img {
transition: all 0.3s;
user-select: none;
cursor: pointer;
}
.preview .icon-close {
position: absolute;
z-index: 2;
right: 10px;
top: 10px;
color: #fff;
font-size: 40px;
}
.preview .button {
position: absolute;
width: 100%;
top: 50%;
transform: translateY(-50%);
z-index: 2;
display: flex;
justify-content: space-between;
padding: 0 20px;
box-sizing: border-box;
}
.preview .button i {
color: #fff;
font-size: 25px;
}
.preview .icon{
z-index: 2;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 30px;
padding: 9px 10px;
background: #716f6fc4;
border-radius: 25px;
}
.preview .icon i {
color: #fff;
font-size: 22px;
margin-right: 20px;
cursor: pointer;
user-select: none;
}
.preview .icon i:last-child {
margin-right: 0px;
}
.icon .right {
transform: rotateY(180deg);
display: inline-block;
}

View File

@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3445167_gwp92uwquwa.css">
</head>
<body>
<div class="list">
<img src="https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg" alt="">
</div>
</body>
<script>
var scaleNum = 1, rotateNum = 0, startX = null, startY = null, oldLeft = null, oldTop = null, MoveStatus = false;
_(".list img").forEach(v => {
v.onclick = () => {
$("body").insertAdjacentHTML("beforeend", `
<div class="preview">
<div class="zz"></div>
<img style="transform: scale(${scaleNum}) rotate(${rotateNum}deg); height: 100%; margin-left: 0px;margin-top: 0px;" class="preview_img" src="https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg" alt="">
<i class="iconfont icon-close"></i>
<div class="button">
<i class="iconfont icon-fanhui"></i>
<i class="iconfont icon-gengduo"></i>
</div>
<div class="icon">
<i class="iconfont icon-suoxiao"></i>
<i class="iconfont icon-fangda"></i>
<i class="iconfont qp icon-quanping"></i>
<i class="iconfont icon-yulanxuanzhuan left "></i>
<i class="iconfont icon-yulanxuanzhuan right"></i>
</div>
</div>
`);
$(".icon-close").onclick = () => {
$("body").removeChild($(".preview"))
}
$(".icon-suoxiao").onclick = () => {
scaleNum = scaleNum - 0.2 < 0.2 ? 0.2 : scaleNum - 0.2
xuanzhong()
}
$(".icon-fangda").onclick = () => {
scaleNum += 0.2
xuanzhong()
}
$(".left").onclick = () => {
rotateNum -= 90
xuanzhong()
}
$(".right").onclick = () => {
rotateNum += 90
xuanzhong()
}
$(".icon-quanping").onclick = () => {
if ($(".qp").classList.contains("icon-quanping")) {
$(".qp").classList.replace("icon-quanping", "icon-beijingyibiyi")
$(".preview_img").style.height = "auto"
} else {
$(".qp").classList.replace("icon-beijingyibiyi", "icon-quanping")
$(".preview_img").style.height = "100%"
}
}
$(".preview_img").onmousedown = (e) => {
MoveStatus = true;
e.preventDefault();
e.stopPropagation();
startX = e.x;
startY = e.y;
oldLeft = parseInt($(".preview_img").style.marginLeft);
oldTop = parseInt($(".preview_img").style.marginTop);
$(".preview_img").onmousemove = (e) => {
console.log("preview_img");
MouseMove(e)
}
$(".preview_img").onmouseup = () => {
MoveStatus = false;
$(".preview_img").onmousemove = null
}
}
$(".preview_img").onmouseout = () => {
if (MoveStatus) {
$(".preview").onmousemove = (e) => {
console.log("preview");
console.log("2 MoveStatus: ", MoveStatus);
MouseMove(e)
}
}
}
$(".preview").onmouseup = () => {
MoveStatus = false;
$(".preview_img").onmousemove = null
$(".preview").onmousemove = null
}
}
})
function MouseMove(e) {
console.log("3 status: ", status);
e.preventDefault();
e.stopPropagation();
var moveX = e.x, moveY = e.y;
var offsetX = moveX - startX, offsetY = moveY - startY;
console.log("移动数值:", offsetX, offsetY);
$(".preview_img").style.marginLeft = `${offsetX + oldLeft}px`;
$(".preview_img").style.marginTop = `${offsetY + oldTop}px`;
}
function xuanzhong() {
$(".preview_img").style.transform = `scale(${scaleNum}) rotate(${rotateNum}deg)`
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1 @@
GET http://127.0.0.1:3000/api/json/class HTTP/1.1

View File

@@ -0,0 +1,23 @@
@import "./config.css";
body,ul,li,p,h1,h2,h3,h4,h5,h6,figure {
margin: 0;
padding: 0;
}
body {
font-size: 0;
}
a {
text-decoration: none;
color: var(--blackColor);
}
li {
list-style: none;
}
::-webkit-scrollbar {
width: 0;
height: 0;
}

View File

@@ -0,0 +1,20 @@
/* 放全局颜色,尺寸等代码 */
:root {
--themeColor: #fb7299;
--otherThemeColor: #fe7fa2;
--whiteColor: #fff;
--blackColor: #000;
--textColor: #999;
--fontSize12: 0.24rem;
--fontSize13: 0.26rem;
--fontSize14: 0.28rem;
--fontSize15: 0.3rem;
--fontSize16: 0.32rem;
--fontSize17: 0.34rem;
--fontSize18: 0.36rem;
--fontSize19: 0.38rem;
--fontSize20: 0.4rem;
--fontSize21: 0.42rem;
}

View File

@@ -0,0 +1,482 @@
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Contents:
1. Buttons
2. Share modal and links
3. Index indicator ("1 of X" counter)
4. Caption
5. Loading indicator
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
*/
/*
1. Buttons
*/
/* <button> css reset */
.pswp__button {
width: 0.88rem;
height: 0.88rem;
position: relative;
background: none;
cursor: pointer;
overflow: visible;
-webkit-appearance: none;
display: block;
border: 0;
padding: 0;
margin: 0;
float: right;
opacity: 0.75;
-webkit-transition: opacity 0.2s;
transition: opacity 0.2s;
-webkit-box-shadow: none;
box-shadow: none; }
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
outline: none;
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
.pswp__ui--over-close .pswp__button--close {
opacity: 1; }
.pswp__button,
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
background: url(default-skin.png) 0 0 no-repeat;
background-size: 5.28rem 1.76rem;
width: 0.88rem;
height: 0.88rem; }
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
.pswp--svg .pswp__button,
.pswp--svg .pswp__button--arrow--left:before,
.pswp--svg .pswp__button--arrow--right:before {
background-image: url(default-skin.svg); }
.pswp--svg .pswp__button--arrow--left,
.pswp--svg .pswp__button--arrow--right {
background: none; } }
.pswp__button--close {
background-position: 0 -0.88rem; }
.pswp__button--share {
background-position: -0.88rem -0.88rem; }
.pswp__button--fs {
display: none; }
.pswp--supports-fs .pswp__button--fs {
display: block; }
.pswp--fs .pswp__button--fs {
background-position: -0.88rem 0; }
.pswp__button--zoom {
display: none;
background-position: -1.76rem 0; }
.pswp--zoom-allowed .pswp__button--zoom {
display: block; }
.pswp--zoomed-in .pswp__button--zoom {
background-position: -2.64rem 0; }
/* no arrows on touch screens */
.pswp--touch .pswp__button--arrow--left,
.pswp--touch .pswp__button--arrow--right {
visibility: hidden; }
/*
Arrow buttons hit area
(icon is added to :before pseudo-element)
*/
.pswp__button--arrow--left,
.pswp__button--arrow--right {
background: none;
top: 50%;
margin-top: -1rem;
width: 1.4rem;
height: 2rem;
position: absolute; }
.pswp__button--arrow--left {
left: 0; }
.pswp__button--arrow--right {
right: 0; }
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
content: '';
top: 0.7rem;
background-color: rgba(0, 0, 0, 0.3);
height: 0.6rem;
width: 0.64rem;
position: absolute; }
.pswp__button--arrow--left:before {
left: 0.12rem;
background-position: -2.76rem -0.88rem; }
.pswp__button--arrow--right:before {
right: 0.12rem;
background-position: -1.88rem -0.88rem; }
/*
2. Share modal/popup and links
*/
.pswp__counter,
.pswp__share-modal {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.pswp__share-modal {
display: block;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 0.2rem;
position: absolute;
z-index: 1600;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__share-modal--hidden {
display: none; }
.pswp__share-tooltip {
z-index: 1620;
position: absolute;
background: #FFF;
top: 1.12rem;
border-radius: 0.04rem;
display: block;
width: auto;
right: 0.88rem;
-webkit-box-shadow: 0 0.04rem 0.1rem rgba(0, 0, 0, 0.25);
box-shadow: 0 0.04rem 0.1rem rgba(0, 0, 0, 0.25);
-webkit-transform: translateY(0.12rem);
-ms-transform: translateY(0.12rem);
transform: translateY(0.12rem);
-webkit-transition: -webkit-transform 0.25s;
transition: transform 0.25s;
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__share-tooltip a {
display: block;
padding: 0.16rem 0.24rem;
color: #000;
text-decoration: none;
font-size: 0.28rem;
line-height: 0.36rem; }
.pswp__share-tooltip a:hover {
text-decoration: none;
color: #000; }
.pswp__share-tooltip a:first-child {
/* round corners on the first/last list item */
border-radius: 0.04rem 0.04rem 0 0; }
.pswp__share-tooltip a:last-child {
border-radius: 0 0 0.04rem 0.04rem; }
.pswp__share-modal--fade-in {
opacity: 1; }
.pswp__share-modal--fade-in .pswp__share-tooltip {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0); }
/* increase size of share links on touch devices */
.pswp--touch .pswp__share-tooltip a {
padding: 0.32rem 0.24rem; }
a.pswp__share--facebook:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
top: -0.24rem;
right: 0.3rem;
border: 0.12rem solid transparent;
border-bottom-color: #FFF;
-webkit-pointer-events: none;
-moz-pointer-events: none;
pointer-events: none; }
a.pswp__share--facebook:hover {
background: #3E5C9A;
color: #FFF; }
a.pswp__share--facebook:hover:before {
border-bottom-color: #3E5C9A; }
a.pswp__share--twitter:hover {
background: #55ACEE;
color: #FFF; }
a.pswp__share--pinterest:hover {
background: #CCC;
color: #CE272D; }
a.pswp__share--download:hover {
background: #DDD; }
/*
3. Index indicator ("1 of X" counter)
*/
.pswp__counter {
position: absolute;
left: 0;
top: 0;
height: 0.88rem;
font-size: 0.26rem;
line-height: 0.88rem;
color: #FFF;
opacity: 0.75;
padding: 0 0.2rem; }
/*
4. Caption
*/
.pswp__caption {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: 0.88rem; }
.pswp__caption small {
font-size: 0.22rem;
color: #BBB; }
.pswp__caption__center {
text-align: left;
max-width: 8.4rem;
margin: 0 auto;
font-size: 0.26rem;
padding: 0.2rem;
line-height: 0.4rem;
color: #CCC; }
.pswp__caption--empty {
display: none; }
/* Fake caption element, used to calculate height of next/prev image */
.pswp__caption--fake {
visibility: hidden; }
/*
5. Loading indicator (preloader)
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
*/
.pswp__preloader {
width: 0.88rem;
height: 0.88rem;
position: absolute;
top: 0;
left: 50%;
margin-left: -0.44rem;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
will-change: opacity;
direction: ltr; }
.pswp__preloader__icn {
width: 0.4rem;
height: 0.4rem;
margin: 0.24rem; }
.pswp__preloader--active {
opacity: 1; }
.pswp__preloader--active .pswp__preloader__icn {
/* We use .gif in browsers that don't support CSS animation */
background: url(preloader.gif) 0 0 no-repeat; }
.pswp--css_animation .pswp__preloader--active {
opacity: 1; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
-webkit-animation: clockwise 500ms linear infinite;
animation: clockwise 500ms linear infinite; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
.pswp--css_animation .pswp__preloader__icn {
background: none;
opacity: 0.75;
width: 0.28rem;
height: 0.28rem;
position: absolute;
left: 0.3rem;
top: 0.3rem;
margin: 0; }
.pswp--css_animation .pswp__preloader__cut {
/*
The idea of animating inner circle is based on Polymer ("material") loading indicator
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
*/
position: relative;
width: 0.14rem;
height: 0.28rem;
overflow: hidden; }
.pswp--css_animation .pswp__preloader__donut {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 0.28rem;
height: 0.28rem;
border: 0.04rem solid #FFF;
border-radius: 50%;
border-left-color: transparent;
border-bottom-color: transparent;
position: absolute;
top: 0;
left: 0;
background: none;
margin: 0; }
@media screen and (max-width: 1024px) {
.pswp__preloader {
position: relative;
left: auto;
top: auto;
margin: 0;
float: right; } }
@-webkit-keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@-webkit-keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
@keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
/*
6. Additional styles
*/
/* root element of UI */
.pswp__ui {
-webkit-font-smoothing: auto;
visibility: visible;
opacity: 1;
z-index: 1550; }
/* top black bar with buttons and "1 of X" indicator */
.pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 0.88rem;
width: 100%; }
.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
-webkit-backface-visibility: hidden;
will-change: opacity;
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
visibility: visible; }
.pswp__top-bar,
.pswp__caption {
background-color: rgba(0, 0, 0, 0.5); }
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
.pswp__ui--fit .pswp__top-bar,
.pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.3); }
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
.pswp__ui--idle .pswp__top-bar {
opacity: 0; }
.pswp__ui--idle .pswp__button--arrow--left,
.pswp__ui--idle .pswp__button--arrow--right {
opacity: 0; }
/*
pswp__ui--hidden class is added when controls are hidden
e.g. when user taps to toggle visibility of controls
*/
.pswp__ui--hidden .pswp__top-bar,
.pswp__ui--hidden .pswp__caption,
.pswp__ui--hidden .pswp__button--arrow--left,
.pswp__ui--hidden .pswp__button--arrow--right {
/* Force paint & create composition layer for controls. */
opacity: 0.001; }
/* pswp__ui--one-slide class is added when there is just one item in gallery */
.pswp__ui--one-slide .pswp__button--arrow--left,
.pswp__ui--one-slide .pswp__button--arrow--right,
.pswp__ui--one-slide .pswp__counter {
display: none; }
.pswp__element--disabled {
display: none !important; }
.pswp--minimal--dark .pswp__top-bar {
background: none; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@@ -0,0 +1 @@
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

View File

@@ -0,0 +1,201 @@
var initPhotoSwipeFromDOM = function(gallerySelector) {
// parse slide data (url, title, size ...) from DOM elements
// (children of gallerySelector)
var parseThumbnailElements = function(el) {
var thumbElements = el.childNodes,
numNodes = thumbElements.length,
items = [],
figureEl,
linkEl,
size,
item;
for(var i = 0; i < numNodes; i++) {
figureEl = thumbElements[i]; // <figure> element
// include only element nodes
if(figureEl.nodeType !== 1) {
continue;
}
linkEl = figureEl.children[0]; // <a> element
size = linkEl.getAttribute('data-size').split('x');
// create slide object
item = {
src: linkEl.getAttribute('href'),
w: parseInt(size[0], 10),
h: parseInt(size[1], 10)
};
if(figureEl.children.length > 1) {
// <figcaption> content
item.title = figureEl.children[1].innerHTML;
}
if(linkEl.children.length > 0) {
// <img> thumbnail element, retrieving thumbnail url
item.msrc = linkEl.children[0].getAttribute('src');
}
item.el = figureEl; // save link to element for getThumbBoundsFn
items.push(item);
}
return items;
};
// find nearest parent element
var closest = function closest(el, fn) {
return el && ( fn(el) ? el : closest(el.parentNode, fn) );
};
// triggers when user clicks on thumbnail
var onThumbnailsClick = function(e) {
e = e || window.event;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
var eTarget = e.target || e.srcElement;
// find root element of slide
var clickedListItem = closest(eTarget, function(el) {
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
});
if(!clickedListItem) {
return;
}
// find index of clicked item by looping through all child nodes
// alternatively, you may define index via data- attribute
var clickedGallery = clickedListItem.parentNode,
childNodes = clickedListItem.parentNode.childNodes,
numChildNodes = childNodes.length,
nodeIndex = 0,
index;
for (var i = 0; i < numChildNodes; i++) {
if(childNodes[i].nodeType !== 1) {
continue;
}
if(childNodes[i] === clickedListItem) {
index = nodeIndex;
break;
}
nodeIndex++;
}
if(index >= 0) {
// open PhotoSwipe if valid index found
openPhotoSwipe( index, clickedGallery );
}
return false;
};
// parse picture index and gallery index from URL (#&pid=1&gid=2)
var photoswipeParseHash = function() {
var hash = window.location.hash.substring(1),
params = {};
if(hash.length < 5) {
return params;
}
var vars = hash.split('&');
for (var i = 0; i < vars.length; i++) {
if(!vars[i]) {
continue;
}
var pair = vars[i].split('=');
if(pair.length < 2) {
continue;
}
params[pair[0]] = pair[1];
}
if(params.gid) {
params.gid = parseInt(params.gid, 10);
}
return params;
};
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
var pswpElement = document.querySelectorAll('.pswp')[0],
gallery,
options,
items;
items = parseThumbnailElements(galleryElement);
// define options (if needed)
options = {
// define gallery index (for URL)
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
getThumbBoundsFn: function(index) {
// See Options -> getThumbBoundsFn section of documentation for more info
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
rect = thumbnail.getBoundingClientRect();
return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
}
};
// PhotoSwipe opened from URL
if(fromURL) {
if(options.galleryPIDs) {
// parse real index when custom PIDs are used
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
for(var j = 0; j < items.length; j++) {
if(items[j].pid == index) {
options.index = j;
break;
}
}
} else {
// in URL indexes start from 1
options.index = parseInt(index, 10) - 1;
}
} else {
options.index = parseInt(index, 10);
}
// exit if index not found
if( isNaN(options.index) ) {
return;
}
if(disableAnimation) {
options.showAnimationDuration = 0;
}
// Pass data to PhotoSwipe and initialize it
gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
};
// loop through all gallery elements and bind events
var galleryElements = document.querySelectorAll( gallerySelector );
for(var i = 0, l = galleryElements.length; i < l; i++) {
galleryElements[i].setAttribute('data-pswp-uid', i+1);
galleryElements[i].onclick = onThumbnailsClick;
}
// Parse URL and open gallery if it contains #&pid=3&gid=1
var hashData = photoswipeParseHash();
if(hashData.pid && hashData.gid) {
openPhotoSwipe( hashData.pid , galleryElements[ hashData.gid - 1 ], true, true );
}
};

View File

@@ -0,0 +1,861 @@
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
/**
*
* UI on top of main sliding area (caption, arrows, close button, etc.).
* Built just using public methods/properties of PhotoSwipe.
*
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.PhotoSwipeUI_Default = factory();
}
})(this, function () {
'use strict';
var PhotoSwipeUI_Default =
function(pswp, framework) {
var ui = this;
var _overlayUIUpdated = false,
_controlsVisible = true,
_fullscrenAPI,
_controls,
_captionContainer,
_fakeCaptionContainer,
_indexIndicator,
_shareButton,
_shareModal,
_shareModalHidden = true,
_initalCloseOnScrollValue,
_isIdle,
_listen,
_loadingIndicator,
_loadingIndicatorHidden,
_loadingIndicatorTimeout,
_galleryHasOneSlide,
_options,
_defaultUIOptions = {
barsSize: {top:44, bottom:'auto'},
closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
timeToIdle: 4000,
timeToIdleOutside: 1000,
loadingIndicatorDelay: 1000, // 2s
addCaptionHTMLFn: function(item, captionEl /*, isFake */) {
if(!item.title) {
captionEl.children[0].innerHTML = '';
return false;
}
captionEl.children[0].innerHTML = item.title;
return true;
},
closeEl:true,
captionEl: true,
fullscreenEl: true,
zoomEl: true,
shareEl: true,
counterEl: true,
arrowEl: true,
preloaderEl: true,
tapToClose: false,
tapToToggleControls: true,
clickToCloseNonZoomable: true,
shareButtons: [
{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+
'?url={{url}}&media={{image_url}}&description={{text}}'},
{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
],
getImageURLForShare: function( /* shareButtonData */ ) {
return pswp.currItem.src || '';
},
getPageURLForShare: function( /* shareButtonData */ ) {
return window.location.href;
},
getTextForShare: function( /* shareButtonData */ ) {
return pswp.currItem.title || '';
},
indexIndicatorSep: ' / ',
fitControlsWidth: 1200
},
_blockControlsTap,
_blockControlsTapTimeout;
var _onControlsTap = function(e) {
if(_blockControlsTap) {
return true;
}
e = e || window.event;
if(_options.timeToIdle && _options.mouseUsed && !_isIdle) {
// reset idle timer
_onIdleMouseMove();
}
var target = e.target || e.srcElement,
uiElement,
clickedClass = target.getAttribute('class') || '',
found;
for(var i = 0; i < _uiElements.length; i++) {
uiElement = _uiElements[i];
if(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) {
uiElement.onTap();
found = true;
}
}
if(found) {
if(e.stopPropagation) {
e.stopPropagation();
}
_blockControlsTap = true;
// Some versions of Android don't prevent ghost click event
// when preventDefault() was called on touchstart and/or touchend.
//
// This happens on v4.3, 4.2, 4.1,
// older versions strangely work correctly,
// but just in case we add delay on all of them)
var tapDelay = framework.features.isOldAndroid ? 600 : 30;
_blockControlsTapTimeout = setTimeout(function() {
_blockControlsTap = false;
}, tapDelay);
}
},
_fitControlsInViewport = function() {
return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth;
},
_togglePswpClass = function(el, cName, add) {
framework[ (add ? 'add' : 'remove') + 'Class' ](el, 'pswp__' + cName);
},
// add class when there is just one item in the gallery
// (by default it hides left/right arrows and 1ofX counter)
_countNumItems = function() {
var hasOneSlide = (_options.getNumItemsFn() === 1);
if(hasOneSlide !== _galleryHasOneSlide) {
_togglePswpClass(_controls, 'ui--one-slide', hasOneSlide);
_galleryHasOneSlide = hasOneSlide;
}
},
_toggleShareModalClass = function() {
_togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden);
},
_toggleShareModal = function() {
_shareModalHidden = !_shareModalHidden;
if(!_shareModalHidden) {
_toggleShareModalClass();
setTimeout(function() {
if(!_shareModalHidden) {
framework.addClass(_shareModal, 'pswp__share-modal--fade-in');
}
}, 30);
} else {
framework.removeClass(_shareModal, 'pswp__share-modal--fade-in');
setTimeout(function() {
if(_shareModalHidden) {
_toggleShareModalClass();
}
}, 300);
}
if(!_shareModalHidden) {
_updateShareURLs();
}
return false;
},
_openWindowPopup = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
pswp.shout('shareLinkClick', e, target);
if(!target.href) {
return false;
}
if( target.hasAttribute('download') ) {
return true;
}
window.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,'+
'location=yes,width=550,height=420,top=100,left=' +
(window.screen ? Math.round(screen.width / 2 - 275) : 100) );
if(!_shareModalHidden) {
_toggleShareModal();
}
return false;
},
_updateShareURLs = function() {
var shareButtonOut = '',
shareButtonData,
shareURL,
image_url,
page_url,
share_text;
for(var i = 0; i < _options.shareButtons.length; i++) {
shareButtonData = _options.shareButtons[i];
image_url = _options.getImageURLForShare(shareButtonData);
page_url = _options.getPageURLForShare(shareButtonData);
share_text = _options.getTextForShare(shareButtonData);
shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url) )
.replace('{{image_url}}', encodeURIComponent(image_url) )
.replace('{{raw_image_url}}', image_url )
.replace('{{text}}', encodeURIComponent(share_text) );
shareButtonOut += '<a href="' + shareURL + '" target="_blank" '+
'class="pswp__share--' + shareButtonData.id + '"' +
(shareButtonData.download ? 'download' : '') + '>' +
shareButtonData.label + '</a>';
if(_options.parseShareButtonOut) {
shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut);
}
}
_shareModal.children[0].innerHTML = shareButtonOut;
_shareModal.children[0].onclick = _openWindowPopup;
},
_hasCloseClass = function(target) {
for(var i = 0; i < _options.closeElClasses.length; i++) {
if( framework.hasClass(target, 'pswp__' + _options.closeElClasses[i]) ) {
return true;
}
}
},
_idleInterval,
_idleTimer,
_idleIncrement = 0,
_onIdleMouseMove = function() {
clearTimeout(_idleTimer);
_idleIncrement = 0;
if(_isIdle) {
ui.setIdle(false);
}
},
_onMouseLeaveWindow = function(e) {
e = e ? e : window.event;
var from = e.relatedTarget || e.toElement;
if (!from || from.nodeName === 'HTML') {
clearTimeout(_idleTimer);
_idleTimer = setTimeout(function() {
ui.setIdle(true);
}, _options.timeToIdleOutside);
}
},
_setupFullscreenAPI = function() {
if(_options.fullscreenEl && !framework.features.isOldAndroid) {
if(!_fullscrenAPI) {
_fullscrenAPI = ui.getFullscreenAPI();
}
if(_fullscrenAPI) {
framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
ui.updateFullscreen();
framework.addClass(pswp.template, 'pswp--supports-fs');
} else {
framework.removeClass(pswp.template, 'pswp--supports-fs');
}
}
},
_setupLoadingIndicator = function() {
// Setup loading indicator
if(_options.preloaderEl) {
_toggleLoadingIndicator(true);
_listen('beforeChange', function() {
clearTimeout(_loadingIndicatorTimeout);
// display loading indicator with delay
_loadingIndicatorTimeout = setTimeout(function() {
if(pswp.currItem && pswp.currItem.loading) {
if( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) {
// show preloader if progressive loading is not enabled,
// or image width is not defined yet (because of slow connection)
_toggleLoadingIndicator(false);
// items-controller.js function allowProgressiveImg
}
} else {
_toggleLoadingIndicator(true); // hide preloader
}
}, _options.loadingIndicatorDelay);
});
_listen('imageLoadComplete', function(index, item) {
if(pswp.currItem === item) {
_toggleLoadingIndicator(true);
}
});
}
},
_toggleLoadingIndicator = function(hide) {
if( _loadingIndicatorHidden !== hide ) {
_togglePswpClass(_loadingIndicator, 'preloader--active', !hide);
_loadingIndicatorHidden = hide;
}
},
_applyNavBarGaps = function(item) {
var gap = item.vGap;
if( _fitControlsInViewport() ) {
var bars = _options.barsSize;
if(_options.captionEl && bars.bottom === 'auto') {
if(!_fakeCaptionContainer) {
_fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');
_fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') );
_controls.insertBefore(_fakeCaptionContainer, _captionContainer);
framework.addClass(_controls, 'pswp__ui--fit');
}
if( _options.addCaptionHTMLFn(item, _fakeCaptionContainer, true) ) {
var captionSize = _fakeCaptionContainer.clientHeight;
gap.bottom = parseInt(captionSize,10) || 44;
} else {
gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top
}
} else {
gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom;
}
// height of top bar is static, no need to calculate it
gap.top = bars.top;
} else {
gap.top = gap.bottom = 0;
}
},
_setupIdle = function() {
// Hide controls when mouse is used
if(_options.timeToIdle) {
_listen('mouseUsed', function() {
framework.bind(document, 'mousemove', _onIdleMouseMove);
framework.bind(document, 'mouseout', _onMouseLeaveWindow);
_idleInterval = setInterval(function() {
_idleIncrement++;
if(_idleIncrement === 2) {
ui.setIdle(true);
}
}, _options.timeToIdle / 2);
});
}
},
_setupHidingControlsDuringGestures = function() {
// Hide controls on vertical drag
_listen('onVerticalDrag', function(now) {
if(_controlsVisible && now < 0.95) {
ui.hideControls();
} else if(!_controlsVisible && now >= 0.95) {
ui.showControls();
}
});
// Hide controls when pinching to close
var pinchControlsHidden;
_listen('onPinchClose' , function(now) {
if(_controlsVisible && now < 0.9) {
ui.hideControls();
pinchControlsHidden = true;
} else if(pinchControlsHidden && !_controlsVisible && now > 0.9) {
ui.showControls();
}
});
_listen('zoomGestureEnded', function() {
pinchControlsHidden = false;
if(pinchControlsHidden && !_controlsVisible) {
ui.showControls();
}
});
};
var _uiElements = [
{
name: 'caption',
option: 'captionEl',
onInit: function(el) {
_captionContainer = el;
}
},
{
name: 'share-modal',
option: 'shareEl',
onInit: function(el) {
_shareModal = el;
},
onTap: function() {
_toggleShareModal();
}
},
{
name: 'button--share',
option: 'shareEl',
onInit: function(el) {
_shareButton = el;
},
onTap: function() {
_toggleShareModal();
}
},
{
name: 'button--zoom',
option: 'zoomEl',
onTap: pswp.toggleDesktopZoom
},
{
name: 'counter',
option: 'counterEl',
onInit: function(el) {
_indexIndicator = el;
}
},
{
name: 'button--close',
option: 'closeEl',
onTap: pswp.close
},
{
name: 'button--arrow--left',
option: 'arrowEl',
onTap: pswp.prev
},
{
name: 'button--arrow--right',
option: 'arrowEl',
onTap: pswp.next
},
{
name: 'button--fs',
option: 'fullscreenEl',
onTap: function() {
if(_fullscrenAPI.isFullscreen()) {
_fullscrenAPI.exit();
} else {
_fullscrenAPI.enter();
}
}
},
{
name: 'preloader',
option: 'preloaderEl',
onInit: function(el) {
_loadingIndicator = el;
}
}
];
var _setupUIElements = function() {
var item,
classAttr,
uiElement;
var loopThroughChildElements = function(sChildren) {
if(!sChildren) {
return;
}
var l = sChildren.length;
for(var i = 0; i < l; i++) {
item = sChildren[i];
classAttr = item.className;
for(var a = 0; a < _uiElements.length; a++) {
uiElement = _uiElements[a];
if(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) {
if( _options[uiElement.option] ) { // if element is not disabled from options
framework.removeClass(item, 'pswp__element--disabled');
if(uiElement.onInit) {
uiElement.onInit(item);
}
//item.style.display = 'block';
} else {
framework.addClass(item, 'pswp__element--disabled');
//item.style.display = 'none';
}
}
}
}
};
loopThroughChildElements(_controls.children);
var topBar = framework.getChildByClass(_controls, 'pswp__top-bar');
if(topBar) {
loopThroughChildElements( topBar.children );
}
};
ui.init = function() {
// extend options
framework.extend(pswp.options, _defaultUIOptions, true);
// create local link for fast access
_options = pswp.options;
// find pswp__ui element
_controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui');
// create local link
_listen = pswp.listen;
_setupHidingControlsDuringGestures();
// update controls when slides change
_listen('beforeChange', ui.update);
// toggle zoom on double-tap
_listen('doubleTap', function(point) {
var initialZoomLevel = pswp.currItem.initialZoomLevel;
if(pswp.getZoomLevel() !== initialZoomLevel) {
pswp.zoomTo(initialZoomLevel, point, 333);
} else {
pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333);
}
});
// Allow text selection in caption
_listen('preventDragEvent', function(e, isDown, preventObj) {
var t = e.target || e.srcElement;
if(
t &&
t.getAttribute('class') && e.type.indexOf('mouse') > -1 &&
( t.getAttribute('class').indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) )
) {
preventObj.prevent = false;
}
});
// bind events for UI
_listen('bindEvents', function() {
framework.bind(_controls, 'pswpTap click', _onControlsTap);
framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
if(!pswp.likelyTouchDevice) {
framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
}
});
// unbind events for UI
_listen('unbindEvents', function() {
if(!_shareModalHidden) {
_toggleShareModal();
}
if(_idleInterval) {
clearInterval(_idleInterval);
}
framework.unbind(document, 'mouseout', _onMouseLeaveWindow);
framework.unbind(document, 'mousemove', _onIdleMouseMove);
framework.unbind(_controls, 'pswpTap click', _onControlsTap);
framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
if(_fullscrenAPI) {
framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
if(_fullscrenAPI.isFullscreen()) {
_options.hideAnimationDuration = 0;
_fullscrenAPI.exit();
}
_fullscrenAPI = null;
}
});
// clean up things when gallery is destroyed
_listen('destroy', function() {
if(_options.captionEl) {
if(_fakeCaptionContainer) {
_controls.removeChild(_fakeCaptionContainer);
}
framework.removeClass(_captionContainer, 'pswp__caption--empty');
}
if(_shareModal) {
_shareModal.children[0].onclick = null;
}
framework.removeClass(_controls, 'pswp__ui--over-close');
framework.addClass( _controls, 'pswp__ui--hidden');
ui.setIdle(false);
});
if(!_options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
}
_listen('initialZoomIn', function() {
if(_options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
}
});
_listen('initialZoomOut', function() {
framework.addClass( _controls, 'pswp__ui--hidden');
});
_listen('parseVerticalMargin', _applyNavBarGaps);
_setupUIElements();
if(_options.shareEl && _shareButton && _shareModal) {
_shareModalHidden = true;
}
_countNumItems();
_setupIdle();
_setupFullscreenAPI();
_setupLoadingIndicator();
};
ui.setIdle = function(isIdle) {
_isIdle = isIdle;
_togglePswpClass(_controls, 'ui--idle', isIdle);
};
ui.update = function() {
// Don't update UI if it's hidden
if(_controlsVisible && pswp.currItem) {
ui.updateIndexIndicator();
if(_options.captionEl) {
_options.addCaptionHTMLFn(pswp.currItem, _captionContainer);
_togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title);
}
_overlayUIUpdated = true;
} else {
_overlayUIUpdated = false;
}
if(!_shareModalHidden) {
_toggleShareModal();
}
_countNumItems();
};
ui.updateFullscreen = function(e) {
if(e) {
// some browsers change window scroll position during the fullscreen
// so PhotoSwipe updates it just in case
setTimeout(function() {
pswp.setScrollOffset( 0, framework.getScrollY() );
}, 50);
}
// toogle pswp--fs class on root element
framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs');
};
ui.updateIndexIndicator = function() {
if(_options.counterEl) {
_indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) +
_options.indexIndicatorSep +
_options.getNumItemsFn();
}
};
ui.onGlobalTap = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
if(_blockControlsTap) {
return;
}
if(e.detail && e.detail.pointerType === 'mouse') {
// close gallery if clicked outside of the image
if(_hasCloseClass(target)) {
pswp.close();
return;
}
if(framework.hasClass(target, 'pswp__img')) {
if(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {
if(_options.clickToCloseNonZoomable) {
pswp.close();
}
} else {
pswp.toggleDesktopZoom(e.detail.releasePoint);
}
}
} else {
// tap anywhere (except buttons) to toggle visibility of controls
if(_options.tapToToggleControls) {
if(_controlsVisible) {
ui.hideControls();
} else {
ui.showControls();
}
}
// tap to close gallery
if(_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) {
pswp.close();
return;
}
}
};
ui.onMouseOver = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
// add class when mouse is over an element that should close the gallery
_togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target));
};
ui.hideControls = function() {
framework.addClass(_controls,'pswp__ui--hidden');
_controlsVisible = false;
};
ui.showControls = function() {
_controlsVisible = true;
if(!_overlayUIUpdated) {
ui.update();
}
framework.removeClass(_controls,'pswp__ui--hidden');
};
ui.supportsFullscreen = function() {
var d = document;
return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);
};
ui.getFullscreenAPI = function() {
var dE = document.documentElement,
api,
tF = 'fullscreenchange';
if (dE.requestFullscreen) {
api = {
enterK: 'requestFullscreen',
exitK: 'exitFullscreen',
elementK: 'fullscreenElement',
eventK: tF
};
} else if(dE.mozRequestFullScreen ) {
api = {
enterK: 'mozRequestFullScreen',
exitK: 'mozCancelFullScreen',
elementK: 'mozFullScreenElement',
eventK: 'moz' + tF
};
} else if(dE.webkitRequestFullscreen) {
api = {
enterK: 'webkitRequestFullscreen',
exitK: 'webkitExitFullscreen',
elementK: 'webkitFullscreenElement',
eventK: 'webkit' + tF
};
} else if(dE.msRequestFullscreen) {
api = {
enterK: 'msRequestFullscreen',
exitK: 'msExitFullscreen',
elementK: 'msFullscreenElement',
eventK: 'MSFullscreenChange'
};
}
if(api) {
api.enter = function() {
// disable close-on-scroll in fullscreen
_initalCloseOnScrollValue = _options.closeOnScroll;
_options.closeOnScroll = false;
if(this.enterK === 'webkitRequestFullscreen') {
pswp.template[this.enterK]( Element.ALLOW_KEYBOARD_INPUT );
} else {
return pswp.template[this.enterK]();
}
};
api.exit = function() {
_options.closeOnScroll = _initalCloseOnScrollValue;
return document[this.exitK]();
};
api.isFullscreen = function() { return document[this.elementK]; };
}
return api;
};
};
return PhotoSwipeUI_Default;
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,179 @@
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
*/
/* pswp = photoswipe */
.pswp {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
z-index: 1500;
-webkit-text-size-adjust: 100%;
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
-webkit-backface-visibility: hidden;
outline: none; }
.pswp * {
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.pswp img {
max-width: none; }
/* style is added when JS option showHideOpacity is set to true */
.pswp--animate_opacity {
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
opacity: 0.001;
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--open {
display: block; }
.pswp--zoom-allowed .pswp__img {
/* autoprefixer: off */
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.pswp--zoomed-in .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab; }
.pswp--dragging .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing; }
/*
Background is added as a separate element.
As animating opacity is much faster than animating rgba() background-color.
*/
.pswp__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #000;
opacity: 0;
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__scroll-wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden; }
.pswp__container,
.pswp__zoom-wrap {
-ms-touch-action: none;
touch-action: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0; }
/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none; }
.pswp__zoom-wrap {
position: absolute;
width: 100%;
-webkit-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
/* for open/close transition */
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp__bg {
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--animated-in .pswp__bg,
.pswp--animated-in .pswp__zoom-wrap {
-webkit-transition: none;
transition: none; }
.pswp__container,
.pswp__zoom-wrap {
-webkit-backface-visibility: hidden; }
.pswp__item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden; }
.pswp__img {
position: absolute;
width: auto;
height: auto;
top: 0;
left: 0; }
/*
stretched thumbnail or div placeholder element (see below)
style is added to avoid flickering in webkit/blink when layers overlap
*/
.pswp__img--placeholder {
-webkit-backface-visibility: hidden; }
/*
div element that matches size of large image
large image loads on top of it
*/
.pswp__img--placeholder--blank {
background: #222; }
.pswp--ie .pswp__img {
width: 100% !important;
height: auto !important;
left: 0;
top: 0; }
/*
Error message appears when image is not loaded
(JS option errorMsg controls markup)
*/
.pswp__error-msg {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
font-size: 0.28rem;
line-height: 0.32rem;
margin-top: -0.16rem;
color: #CCC; }
.pswp__error-msg a {
color: #CCC;
text-decoration: underline; }

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,21 @@
.menu {
padding: .4rem .3rem;
}
.menu .text{
font-size: .32rem;
font-weight: 400;
margin-bottom: .2rem;
}
.menu ul{
display: flex;
flex-wrap: wrap;
}
.menu ul li{
padding: .06rem .2rem;
font-size: .28rem;
background: var(--themeColor);
margin-right: .2rem;
color: #fff;
border-radius: .4rem;
margin-bottom: .14rem;
}

View File

@@ -0,0 +1,88 @@
@import "./config.css";
.header {
position: fixed;
width: 100%;
height: 1.6rem;
top: 0;
left: 0;
right: 0;
z-index: 99;
}
.header .header_top {
background: var(--themeColor);
height: 0.88rem;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.3rem;
}
.header .header_top .icon-taozi1,
.header .header_top .icon-wo {
font-size: 0.45rem;
color: var(--whiteColor);
}
.header .header_top .search {
flex: 1;
background: var(--whiteColor);
height: 0.6rem;
border-radius: 0.6rem;
margin-left: 10px;
margin-right: 10px;
display: flex;
align-items: center;
}
.header .header_top .search i {
color: var(--textColor);
font-size: 0.26rem;
margin-right: 0.1rem;
padding-top: 0.02rem;
margin-left: 0.26rem;
}
.header .header_top .search span {
font-size: var(--fontSize12);
color: var(--textColor);
}
.header .header_menu {
height: 0.72rem;
display: flex;
align-items: center;
background: var(--otherThemeColor);
padding-left: 0.3rem;
}
.header .header_menu .active {
color: var(--whiteColor);
}
.header .header_menu ul {
display: flex;
flex: 1;
overflow-x: scroll;
}
.header .header_menu a {
color: #fff;
width: 0.8rem;
height: 0.72rem;
text-align: center;
line-height: 0.72rem;
}
.header .header_menu ul li{
font-size: 0.26rem;
margin-right: 0.26rem;
color: #d3d2d2;
flex-shrink: 0;
}
.content {
margin-top: 1.6rem;
}
.swiper {
font-size: .4rem;
}
.swiper-slide {
height: calc(100vh - 1.6rem - 1rem) !important;
overflow-y: scroll;
}

View File

@@ -0,0 +1,3 @@
.imgList img {
width: 100%;
}

View File

@@ -0,0 +1,40 @@
.gggg{
display: flex;
flex-wrap: wrap;
}
.ccccc{
width: 40%;
margin: 0 5%;
}
.list{
font-size: .5rem;
}
img{
width: 100%;
}
.bb{
font-size: 0.34rem;
font-weight: 400;
margin-top: 0.2rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ww,.qq{
font-size: 0.28rem;
color: #bdb7b7;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ee span{
font-size: 0.24rem;
flex-shrink: 0;
padding: 0.08rem 0.18rem;
background: var(--themeColor);
margin-right: 0.1rem;
color: #fff;
border-radius: 0.2rem;
margin-bottom: 0.1rem;
}

View File

@@ -0,0 +1,116 @@
@import "./config.css";
.footer {
position: fixed;
bottom: 0;
height: 1rem;
width: 100%;
background: var(--whiteColor);
z-index: 999;
left: 0;
display: flex;
align-items: center;
justify-content: space-around;
}
.footer li {
text-align: center;
}
.footer li .active i,
.footer li .active p{
color: var(--themeColor);
}
.footer li a {}
.footer li a i {}
.footer li a p{
font-size: 0.24rem;
margin-top: 0.04rem;
}
.content {
margin-top: .9rem;
margin-bottom: 1rem;
}
.list {
display: flex;
justify-content: space-between;
padding: .16rem;
flex-wrap: wrap;
}
.list .item {
width: 49%;
margin-bottom: .24rem;
}
.list .item .img {
position: relative;
}
.list .item .img img {
width: 100%;
}
.list .item .img span {
position: absolute;
z-index: 1;
color: #fff;
right: .2rem;
bottom: .28rem;
font-size: .24rem;
background: var(--themeColor);
padding: .06rem .18rem;
border-radius: .6rem;
}
.list .item .text{}
.list .item .text .title{
font-size: 0.34rem;
font-weight: 400;
margin-top: 0.2rem;
}
.list .item .text .model,
.list .item .text .mechanism{
font-size: 0.28rem;
color: #bdb7b7;
}
.list .item .tags{
margin-top: 0.1rem;
display: flex;
flex-wrap: wrap;
}
.list .item .tags a{
font-size: 0.24rem;
flex-shrink: 0;
padding: 0.08rem 0.18rem;
background: var(--themeColor);
margin-right: 0.1rem;
color: #fff;
border-radius: 0.2rem;
margin-bottom: 0.1rem;
}
.pub_title {
width: 100%;
position: fixed;
left: 0;
top: 0;
height: .9rem;
background: var(--themeColor);
color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 .2rem;
box-sizing: border-box;
}
.pub_title i {
font-size: .4rem;
}
.pub_title span {
font-size: .36rem;
flex: 1;
margin-left: 0.28rem;
margin-right: 0.18rem;
}

View File

@@ -0,0 +1,33 @@
.list {
display: flex;
flex-wrap: wrap;
background: #00000008;
padding-left: 0.2rem;
justify-content: flex-start !important;
box-sizing: border-box;
}
.list .shuliang {
overflow-y: scroll;
width: 20%;
padding-top: .3rem;
margin-left: 0.2rem;
flex-shrink: 0;
}
.list .shuliang .title{
font-size: .3rem;
color: black;
margin-bottom: .1rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.list .shuliang .number{
font-size: .2rem;
color: var(--themeColor);
text-align: center;
}

View File

@@ -0,0 +1,54 @@
.hot{
height: calc(100vh - 0.9rem - 1rem);
overflow-y: scroll;
}
.hot_model{
padding-top: 30px;
font-size: 18px;
margin-left: 10px;
}
.hot_modelAll{
display: flex;
flex-wrap: wrap;
padding: 4px 7px;
box-sizing: border-box;
}
.model{
width: 60px;
margin: 15px;
}
.model a{}
.model .model_top{
position: relative;
}
.model .model_top img{
width: 100%;
border-radius: 50%;
}
.model .model_top span{
color: var(--whiteColor);
font-size: 10px;
height: 18px;
width: 40px;
background: #3333338f;
position: absolute;
text-align: center;
line-height: 18px;
border-radius: 10px;
bottom: -2px;
left: 10px;
transform: scale(0.8);
}
.model_bottom{
color: var(--textColor);
font-size: 10px;
transform: scale(0.8);
margin-top: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

Some files were not shown because too many files have changed in this diff Show More