feat(ui): 添加移动端侧边菜单栏及响应式样式调整
添加移动端侧边菜单栏组件,包含用户信息、导航链接和发布按钮 调整页面头部在不同屏幕尺寸下的响应式布局 新增菜单图标资源文件 优化logo间距和输入框在移动端的显示效果
This commit is contained in:
@@ -1287,7 +1287,29 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(0, 0, 0, 0.20392157);
|
background-color: rgba(0, 0, 0, 0.20392157);
|
||||||
}
|
}
|
||||||
|
@media screen and (max-width: 1200px) {
|
||||||
|
header.page-header {
|
||||||
|
min-width: auto !important;
|
||||||
|
}
|
||||||
|
header.page-header .box {
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
.head-top.flexacenter {
|
||||||
|
max-width: 1200px !important;
|
||||||
|
width: initial !important;
|
||||||
|
margin: 20px 10px 30px !important;
|
||||||
|
}
|
||||||
|
.head-top.flexacenter .input-box {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@media screen and (max-width: 850px) {
|
@media screen and (max-width: 850px) {
|
||||||
|
header.page-header {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.head-top .post-list {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
#details {
|
#details {
|
||||||
padding: 10px 10px 0;
|
padding: 10px 10px 0;
|
||||||
}
|
}
|
||||||
@@ -1360,6 +1382,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 500px) {
|
@media screen and (max-width: 500px) {
|
||||||
|
.head-top.flexacenter .input-box {
|
||||||
|
width: inherit;
|
||||||
|
}
|
||||||
|
.head-top.flexacenter .input-box .input,
|
||||||
|
.head-top.flexacenter .input-box .placeholder {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#details .answer-discuss .comments-box .comments-item .comments-header {
|
#details .answer-discuss .comments-box .comments-item .comments-header {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1524,8 +1524,35 @@
|
|||||||
background-color: rgba(0, 0, 0, 0.20392157);
|
background-color: rgba(0, 0, 0, 0.20392157);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1200px) {
|
||||||
|
header.page-header {
|
||||||
|
min-width: auto !important;
|
||||||
|
.box {
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-top.flexacenter {
|
||||||
|
max-width: 1200px !important;
|
||||||
|
width: initial !important;
|
||||||
|
margin: 20px 10px 30px !important;
|
||||||
|
|
||||||
|
.input-box {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 媒体查询 最大宽度 850px 时
|
// 媒体查询 最大宽度 850px 时
|
||||||
@media screen and (max-width: 850px) {
|
@media screen and (max-width: 850px) {
|
||||||
|
header.page-header {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-top .post-list {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
#details {
|
#details {
|
||||||
padding: 10px 10px 0;
|
padding: 10px 10px 0;
|
||||||
|
|
||||||
@@ -1640,6 +1667,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 500px) {
|
@media screen and (max-width: 500px) {
|
||||||
|
.head-top.flexacenter .input-box {
|
||||||
|
width: inherit;
|
||||||
|
.input,
|
||||||
|
.placeholder {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
#details {
|
#details {
|
||||||
.answer-discuss {
|
.answer-discuss {
|
||||||
.comments-box {
|
.comments-box {
|
||||||
|
|||||||
138
css/public.css
138
css/public.css
@@ -1576,6 +1576,7 @@ body {
|
|||||||
}
|
}
|
||||||
.head-top .logo {
|
.head-top .logo {
|
||||||
height: 52px;
|
height: 52px;
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.head-top .input-box {
|
.head-top .input-box {
|
||||||
width: 370px;
|
width: 370px;
|
||||||
@@ -1949,3 +1950,140 @@ td {
|
|||||||
-webkit-transform: scale(1);
|
-webkit-transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.head-pop {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, 0.70588235);
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
.head-pop.head-pop-show {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.head-pop.head-pop-show .head-more-pop {
|
||||||
|
animation: slide-in-left 0.5s ease-out forwards;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
width: 80vw;
|
||||||
|
right: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: auto;
|
||||||
|
transition: all 0.2s;
|
||||||
|
right: -100%;
|
||||||
|
opacity: 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
@keyframes slide-in-left {
|
||||||
|
0% {
|
||||||
|
right: -100%;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
right: 0;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo {
|
||||||
|
height: 108px;
|
||||||
|
margin-left: 24px;
|
||||||
|
padding-right: 27px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-bottom: 0.5px solid #ebebeb;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-left .head-more-userinfo-avatar {
|
||||||
|
margin-right: 9px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-left .head-more-userinfo-username {
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-right {
|
||||||
|
width: 84px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-right .information-box {
|
||||||
|
position: relative;
|
||||||
|
width: 16.5px;
|
||||||
|
height: 16.5px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-right .information-box .information-icon {
|
||||||
|
width: 16.5px;
|
||||||
|
height: 16.5px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-right .red-dot {
|
||||||
|
position: absolute;
|
||||||
|
right: -7.5px;
|
||||||
|
top: -7.5px;
|
||||||
|
width: 13.5px;
|
||||||
|
height: 13.5px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 24px;
|
||||||
|
background-color: #fd3f5d;
|
||||||
|
font-size: 9.75px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-userinfo .head-more-right .loginBtn {
|
||||||
|
width: 84px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 117px;
|
||||||
|
background-color: #62b1ff;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12.75px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .tab-list {
|
||||||
|
padding-right: 27px;
|
||||||
|
margin-left: 24px;
|
||||||
|
border-bottom: 0.5px solid #ebebeb;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .tab-list .tab-item {
|
||||||
|
height: 54px;
|
||||||
|
margin: 12.3px 0;
|
||||||
|
border-radius: 8.25px;
|
||||||
|
padding-left: 24px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #555555;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .tab-list .tab-item.pitch {
|
||||||
|
background-color: #50e3c2;
|
||||||
|
font-weight: 650;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-post {
|
||||||
|
color: #000;
|
||||||
|
font-size: 15px;
|
||||||
|
margin: 48px 0 100px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-post .head-more-post-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 5px;
|
||||||
|
background-color: #fddf6d;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .head-more-post .head-more-post-icon .head-more-post-img {
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
}
|
||||||
|
.head-pop .head-more-pop .cross-icon {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
padding: 15px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 11.25px;
|
||||||
|
left: calc(50% + 45px);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|||||||
160
css/public.less
160
css/public.less
@@ -1903,6 +1903,7 @@ body {
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
height: 52px;
|
height: 52px;
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-box {
|
.input-box {
|
||||||
@@ -2343,3 +2344,162 @@ td {
|
|||||||
-webkit-transform: scale(1);
|
-webkit-transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.head-pop {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, 0.70588235);
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
&.head-pop-show {
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
.head-more-pop {
|
||||||
|
animation: slide-in-left 0.5s ease-out forwards;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-more-pop {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
width: 80vw;
|
||||||
|
right: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: auto;
|
||||||
|
transition: all 0.2s;
|
||||||
|
right: -100%;
|
||||||
|
opacity: 0;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
@keyframes slide-in-left {
|
||||||
|
0% {
|
||||||
|
right: -100%;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
right: 0;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-more-userinfo {
|
||||||
|
height: 108px;
|
||||||
|
margin-left: 24px;
|
||||||
|
padding-right: 27px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-bottom: 0.5px solid #ebebeb;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.head-more-left {
|
||||||
|
.head-more-userinfo-avatar {
|
||||||
|
margin-right: 9px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-more-userinfo-username {
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-more-right {
|
||||||
|
width: 84px;
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
.information-box {
|
||||||
|
position: relative;
|
||||||
|
width: 16.5px;
|
||||||
|
height: 16.5px;
|
||||||
|
|
||||||
|
.information-icon {
|
||||||
|
width: 16.5px;
|
||||||
|
height: 16.5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-dot {
|
||||||
|
position: absolute;
|
||||||
|
right: -7.5px;
|
||||||
|
top: -7.5px;
|
||||||
|
width: 13.5px;
|
||||||
|
height: 13.5px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 24px;
|
||||||
|
background-color: #fd3f5d;
|
||||||
|
font-size: 9.75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginBtn {
|
||||||
|
width: 84px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 117px;
|
||||||
|
background-color: #62b1ff;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12.75px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-list {
|
||||||
|
padding-right: 27px;
|
||||||
|
margin-left: 24px;
|
||||||
|
border-bottom: 0.5px solid #ebebeb;
|
||||||
|
|
||||||
|
.tab-item {
|
||||||
|
height: 54px;
|
||||||
|
margin: 12.3px 0;
|
||||||
|
border-radius: 8.25px;
|
||||||
|
padding-left: 24px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #555555;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&.pitch {
|
||||||
|
background-color: #50e3c2;
|
||||||
|
font-weight: 650;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-more-post {
|
||||||
|
color: #000;
|
||||||
|
font-size: 15px;
|
||||||
|
margin: 48px 0 100px;
|
||||||
|
|
||||||
|
.head-more-post-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 5px;
|
||||||
|
background-color: #fddf6d;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
.head-more-post-img {
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cross-icon {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
padding: 15px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 11.25px;
|
||||||
|
left: calc(50% + 45px);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
58
details.html
58
details.html
@@ -16,6 +16,62 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<script>window.__ASSET_VERSION__ = 'Z69';</script>
|
||||||
|
|
||||||
|
<div class="head-pop">
|
||||||
|
<div class="head-more-pop">
|
||||||
|
<div class="head-more-userinfo flex1 flexacenter">
|
||||||
|
<div class="head-more-left flexacenter">
|
||||||
|
<img class="head-more-userinfo-avatar" src="" alt="">
|
||||||
|
<div class="head-more-userinfo-username"></div>
|
||||||
|
</div>
|
||||||
|
<div class="head-more-right">
|
||||||
|
<div class="loginBtn flexcenter" @click="handleRegister">登录/注册</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-list">
|
||||||
|
<a class="tab-item flexacenter" href="https://www.gter.net" target="_blank">寄托首页</a>
|
||||||
|
<a class="tab-item flexacenter pitch" href="https://f.gter.net" target="_blank">论坛</a>
|
||||||
|
<a class="tab-item flexacenter" href="https://app.gter.net/admissionOfficer" target="_blank">招生官</a>
|
||||||
|
<a class="tab-item flexacenter" href="https://bbs.gter.net/thread-2345065-1-1.html" target="_blank">加群</a>
|
||||||
|
<a class="tab-item flexacenter" href="https://offer.gter.net" target="_blank">Offer榜</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="head-more-post flexcenter" href="/publish" target="" onclick="skipLoginUrl(event)">
|
||||||
|
<div class="head-more-post-icon flexcenter">
|
||||||
|
<img class="head-more-post-img" src="//framework.x-php.com/gter/image/gter/offer/mobile/img/addyellow.svg?v=5.2.91_320043737" />
|
||||||
|
</div>
|
||||||
|
发布帖子
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<img class="cross-icon" v-if="headMorePopState" @click="headMorePopState = !headMorePopState" src="//framework.x-php.com/gter/image/gter/offer/mobile/img/cross.svg?v=5.2.91_320043737">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log('', window["userInfoWin"]?.uin > 0, window["userInfoWin"]?.uid > 0);
|
||||||
|
if (window["userInfoWin"]?.uin > 0 || window["userInfoWin"]?.uid > 0) {
|
||||||
|
// 登录
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const avatar = document.querySelector(".head-more-userinfo-avatar")
|
||||||
|
console.log('avatar');
|
||||||
|
avatar.src = "/img/defaultAvatar.png"
|
||||||
|
}
|
||||||
|
document.querySelector(".head-pop").classList.add("head-pop-show");
|
||||||
|
|
||||||
|
}, 1000);
|
||||||
|
const skipLoginUrl = (e) => {
|
||||||
|
console.log('e', e);
|
||||||
|
if (window["userInfoWin"]?.uin > 0 || window["userInfoWin"]?.uid > 0) {
|
||||||
|
} else {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<div id="pre-loader">
|
<div id="pre-loader">
|
||||||
<div class="three-bounce" p-id="11">
|
<div class="three-bounce" p-id="11">
|
||||||
<div class="one" p-id="12"></div>
|
<div class="one" p-id="12"></div>
|
||||||
@@ -25,7 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<sign-in-box></sign-in-box>
|
<sign-in-box></sign-in-box>
|
||||||
<div class="container" id="details" v-cloak>
|
<div class="container" id="details" v-cloak>
|
||||||
<div class="templateValue" ref="uniqidRef">4uPq5uKzTPTP</div>
|
<div class="templateValue" ref="uniqidRef">WObXKrbm1CSn</div>
|
||||||
|
|
||||||
<div class="head-top flexacenter">
|
<div class="head-top flexacenter">
|
||||||
<img class="logo" src="https://oss.gter.net/logo" alt="" />
|
<img class="logo" src="https://oss.gter.net/logo" alt="" />
|
||||||
|
|||||||
BIN
img/comment-icon-gray.png
Normal file
BIN
img/comment-icon-gray.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 856 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
img/menu-icon-gray.png
Normal file
BIN
img/menu-icon-gray.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 733 B |
Reference in New Issue
Block a user