|
@@ -3,7 +3,7 @@
|
|
|
* SUI Topbar
|
|
|
* 顶栏 默认样式
|
|
|
* 基于 SUI 库开发的组件,适用于 Web 应用程序
|
|
|
- * 最后更新日期:2024年08月5日
|
|
|
+ * 最后更新日期:2024年08月16日
|
|
|
*/
|
|
|
|
|
|
/* ------ Topbar [ ------ */
|
|
@@ -30,7 +30,11 @@
|
|
|
text-decoration: none !important;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar .topbar-logo, .sui-topbar .topbar-menu, .sui-topbar .topbar-menu > a, .sui-topbar .topbar-menu > span, .sui-topbar > .topbar-link {
|
|
|
+.sui-topbar .topbar-logo,
|
|
|
+.sui-topbar .topbar-menu,
|
|
|
+.sui-topbar .topbar-menu>a,
|
|
|
+.sui-topbar .topbar-menu>span,
|
|
|
+.sui-topbar>.topbar-link {
|
|
|
display: inline-block;
|
|
|
height: 54px;
|
|
|
}
|
|
@@ -40,24 +44,33 @@
|
|
|
width: 130px;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar .topbar-logo img, .sui-topbar .topbar-searchBox {
|
|
|
+.sui-topbar .topbar-logo img,
|
|
|
+.sui-topbar .topbar-searchBox {
|
|
|
width: auto;
|
|
|
height: 60%;
|
|
|
- vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar .topbar-logo:before, .sui-topbar .topbar-menu > a:before, .sui-topbar .topbar-menu > span:before, .sui-topbar > .topbar-functions:before, .sui-topbar > .topbar-functions > a, .sui-topbar > .topbar-functions > span, .sui-topbar > .topbar-functions > a:before, .sui-topbar > .topbar-functions > span:before, .sui-topbar > .topbar-link:before {
|
|
|
+.sui-topbar .topbar-logo:before,
|
|
|
+.sui-topbar .topbar-menu>a:before,
|
|
|
+.sui-topbar .topbar-menu>span:before,
|
|
|
+.sui-topbar>.topbar-functions:before,
|
|
|
+.sui-topbar>.topbar-functions>a,
|
|
|
+.sui-topbar>.topbar-functions>span,
|
|
|
+.sui-topbar>.topbar-functions>a:before,
|
|
|
+.sui-topbar>.topbar-functions>span:before,
|
|
|
+.sui-topbar>.topbar-link:before {
|
|
|
display: inline-block;
|
|
|
content: '';
|
|
|
height: 54px;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar .topbar-menu > a, .sui-topbar .topbar-menu > span {
|
|
|
+.sui-topbar .topbar-menu>a,
|
|
|
+.sui-topbar .topbar-menu>span {
|
|
|
padding: 0 24px;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar > .topbar-functions {
|
|
|
+.sui-topbar>.topbar-functions {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
right: 0;
|
|
@@ -65,6 +78,13 @@
|
|
|
}
|
|
|
|
|
|
.sui-topbar .topbar-searchBox {
|
|
|
+ position: relative;
|
|
|
+ display: inline-flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.sui-topbar .topbar-searchBox-body {
|
|
|
position: relative;
|
|
|
display: inline-flex;
|
|
|
width: 350px;
|
|
@@ -183,11 +203,13 @@
|
|
|
background-color: #2f0808;
|
|
|
}
|
|
|
|
|
|
-.topbar-functions > * + * {
|
|
|
+.topbar-functions>*+* {
|
|
|
padding-left: 6px;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar .topbar-link:hover, .sui-topbar > .topbar-functions > a:hover, .sui-topbar > .topbar-functions > span:hover {
|
|
|
+.sui-topbar .topbar-link:hover,
|
|
|
+.sui-topbar>.topbar-functions>a:hover,
|
|
|
+.sui-topbar>.topbar-functions>span:hover {
|
|
|
color: #581818;
|
|
|
}
|
|
|
|
|
@@ -198,15 +220,17 @@
|
|
|
padding: 12px 0;
|
|
|
}
|
|
|
|
|
|
-.topbar-GlobalSearchBox, .sui-topbar > .topbar-functions > a.topbar-searchIcon, .sui-topbar > .topbar-functions > a.topbar-loginIcon {
|
|
|
+.topbar-GlobalSearchBox,
|
|
|
+.sui-topbar>.topbar-functions>a.topbar-loginIcon {
|
|
|
display: none;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar > .topbar-link {
|
|
|
+.sui-topbar>.topbar-link {
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
|
|
|
-.sui-topbar > .topbar-link:hover, .topbar-loginLink:hover {
|
|
|
+.sui-topbar>.topbar-link:hover,
|
|
|
+.topbar-loginLink:hover {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
@@ -214,6 +238,24 @@
|
|
|
background-color: #9a3d3d;
|
|
|
}
|
|
|
|
|
|
+.topbar-searchIcon,
|
|
|
+.topbar-closeSearchIcon {
|
|
|
+ position: relative;
|
|
|
+ display: none;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.topbar-searchIcon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.topbar-closeSearchIcon {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+}
|
|
|
+
|
|
|
/* mobile */
|
|
|
.mobile.sui-topbar {
|
|
|
font-size: 12px;
|
|
@@ -222,7 +264,35 @@
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
-.mobile.sui-topbar .topbar-searchBox {
|
|
|
- max-width: 280px;
|
|
|
- min-width: 200px;
|
|
|
+.mobile.search-active .topbar-searchBox {
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ background-color: #f2f2f2;
|
|
|
+ z-index: 10;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.mobile .topbar-searchBox-body {
|
|
|
+ display: none;
|
|
|
+ flex-grow: 1;
|
|
|
}
|
|
|
+
|
|
|
+.mobile .topbar-searchIcon,
|
|
|
+.mobile.search-active .topbar-searchBox-body,
|
|
|
+.mobile.search-active .topbar-closeSearchIcon {
|
|
|
+ display: inline-flex;
|
|
|
+}
|
|
|
+
|
|
|
+.mobile.search-active .topbar-searchIcon,
|
|
|
+.mobile.search-active .topbar-functions .topbar-loginIcon,
|
|
|
+.mobile.search-active .topbar-functions .topbar-loginLink {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+
|
|
|
+.mobile.search-active .topbar-functions {
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+}
|