Permalink
Browse files

* improve document UI.

  • Loading branch information...
1 parent 7ccb3bc commit 4c72ade06c579ba3c97d352ea1e97171aa7a6134 @Catouse Catouse committed Sep 6, 2016
Showing with 236 additions and 152 deletions.
  1. +56 −16 docs/css/doc.css
  2. +2 −2 docs/css/doc.min.css
  3. +80 −75 docs/css/zui.css
  4. +2 −2 docs/css/zui.min.css
  5. +18 −12 docs/js/doc.js
  6. +3 −3 docs/js/doc.min.js
  7. +5 −3 docs/js/zui.js
  8. +8 −8 docs/js/zui.min.js
  9. +1 −1 index.html
  10. +1 −1 src/js/colorset.js
  11. +3 −1 src/js/device.js
  12. +17 −11 src/js/doc.js
  13. +40 −17 src/less/doc.less
View
@@ -1,5 +1,5 @@
/*!
- * ZUI: Document - v1.5.0 - 2016-09-05
+ * ZUI: Document - v1.5.0 - 2016-09-06
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
@@ -2154,6 +2154,25 @@ body.query-enabled[data-query='icons'] #grid .card.open.section-preview-show .se
#pageAttrs .dropdown-header.primary-header[data-type="bundles"] {
color: #38b03f;
}
+@media (max-width: 767px) {
+ #pageAttrs {
+ padding-bottom: 10px;
+ padding-left: 0;
+ margin: 0 0 10px 0;
+ }
+ #pageAttrs > .pull-right {
+ margin: 0 0 5px 5px !important;
+ }
+ #pageAttrs .badge {
+ min-width: 30px;
+ padding: 5px;
+ margin-right: 5px;
+ margin-left: 0;
+ }
+ #pageAttrs > .badge {
+ margin-bottom: 5px;
+ }
+ }
#pageContent {
position: relative;
padding-left: 44px;
@@ -2305,6 +2324,11 @@ body.query-enabled[data-query='icons'] #grid .card.open.section-preview-show .se
width: 9px;
height: 1px;
}
+@media (max-width: 767px) {
+ #pageTogger {
+ display: none;
+ }
+ }
#page.page-collapsed #pageTogger:before {
display: block;
}
@@ -2373,7 +2397,7 @@ body.compact-mode #header {
top: 0;
right: 0;
left: 0;
- z-index: 1025;
+ z-index: 1010;
height: 483px;
}
body.compact-mode #headContainer > .container {
@@ -2691,19 +2715,17 @@ body.page-show[data-page-accent="purple"] #pageTogger:hover:after {
#ad > a {
width: 250px;
}
- #pageTogger {
- bottom: -68px;
- left: 8px;
+ #grid .col {
+ width: 100%;
}
- #pageAttrs {
- padding-left: 0;
- margin-left: 20px;
+ #page {
+ top: 0;
+ z-index: 1015;
}
#pageContent {
- padding-left: 20px;
+ padding-left: 0;
}
#pageContent:before {
- left: 0;
display: none;
}
#pageHeader > .container {
@@ -2713,19 +2735,37 @@ body.page-show[data-page-accent="purple"] #pageTogger:hover:after {
left: 15px;
}
#pageContent > section:before {
- left: -15px;
- }
- #pageContent > section > header:before {
- left: -20px;
+ display: none;
}
+ #pageContent > section > header:before,
#pageContent > section > header:after {
display: none;
}
+ #pageContent > section > header > h3 {
+ position: relative;
+ }
#pageContent > section > header > h3:before {
- left: -15px;
+ display: none;
}
#pageContent > section > header > h3:after {
- left: -18px;
+ top: 1px;
+ right: -12px;
+ left: auto;
+ font-family: ZenIcon;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ line-height: 1;
+ text-transform: none;
+ content: '\e651';
+
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+ #pageContent > section.collapsed > header > h3:after {
+ content: '\e650';
}
body.compact-mode #header {
height: 433px;
Oops, something went wrong.
View
@@ -1,5 +1,5 @@
/*!
- * ZUI: ZUI for official website - v1.5.0 - 2016-09-05
+ * ZUI: ZUI for official website - v1.5.0 - 2016-09-06
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
@@ -4040,80 +4040,82 @@ button.close {
background: transparent;
border: 0;
}
-::-webkit-scrollbar {
- width: 10px;
- height: 10px;
- }
-::-webkit-scrollbar-button {
- width: 0;
- height: 0;
- }
-::-webkit-scrollbar-button:start:decrement,
-::-webkit-scrollbar-button:end:increment {
- display: block;
- }
-::-webkit-scrollbar-button:vertical:start:increment,
-::-webkit-scrollbar-button:vertical:end:decrement {
- display: none;
- }
-::-webkit-scrollbar-track:vertical,
-::-webkit-scrollbar-track:horizontal,
-::-webkit-scrollbar-thumb:vertical,
-::-webkit-scrollbar-thumb:horizontal,
-::-webkit-scrollbar-track:vertical,
-::-webkit-scrollbar-track:horizontal,
-::-webkit-scrollbar-thumb:vertical,
-::-webkit-scrollbar-thumb:horizontal {
- border-color: transparent;
- border-style: solid;
- }
-::-webkit-scrollbar-track:vertical::-webkit-scrollbar-track:horizontal {
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- }
-::-webkit-scrollbar-thumb {
- min-height: 28px;
- padding-top: 100;
- background-color: rgba(0, 0, 0, .2);
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border-radius: 5px;
- -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset 0 -1px 0 rgba(0, 0, 0, .07);
- }
-::-webkit-scrollbar-thumb:hover {
- background-color: rgba(0, 0, 0, .4);
- -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);
- }
-::-webkit-scrollbar-thumb:active {
- background-color: rgba(0, 0, 0, .5);
- -webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .35);
- }
-::-webkit-scrollbar-track:vertical,
-::-webkit-scrollbar-track:horizontal,
-::-webkit-scrollbar-thumb:vertical,
-::-webkit-scrollbar-thumb:horizontal {
- border-width: 0;
- }
-::-webkit-scrollbar-track:hover {
- background-color: rgba(0, 0, 0, .05);
- -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1);
- }
-::-webkit-scrollbar-track:active {
- background-color: rgba(0, 0, 0, .05);
- -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .14), inset -1px -1px 0 rgba(0, 0, 0, .07);
- }
-.scrollbar-hover::-webkit-scrollbar,
-.scrollbar-hover::-webkit-scrollbar-button,
-.scrollbar-hover::-webkit-scrollbar-track,
-.scrollbar-hover::-webkit-scrollbar-thumb {
- visibility: hidden;
- }
-.scrollbar-hover:hover::-webkit-scrollbar,
-.scrollbar-hover:hover::-webkit-scrollbar-button,
-.scrollbar-hover:hover::-webkit-scrollbar-track,
-.scrollbar-hover:hover::-webkit-scrollbar-thumb {
- visibility: visible;
+@media (min-width: 768px) {
+ ::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ }
+ ::-webkit-scrollbar-button {
+ width: 0;
+ height: 0;
+ }
+ ::-webkit-scrollbar-button:start:decrement,
+ ::-webkit-scrollbar-button:end:increment {
+ display: block;
+ }
+ ::-webkit-scrollbar-button:vertical:start:increment,
+ ::-webkit-scrollbar-button:vertical:end:decrement {
+ display: none;
+ }
+ ::-webkit-scrollbar-track:vertical,
+ ::-webkit-scrollbar-track:horizontal,
+ ::-webkit-scrollbar-thumb:vertical,
+ ::-webkit-scrollbar-thumb:horizontal,
+ ::-webkit-scrollbar-track:vertical,
+ ::-webkit-scrollbar-track:horizontal,
+ ::-webkit-scrollbar-thumb:vertical,
+ ::-webkit-scrollbar-thumb:horizontal {
+ border-color: transparent;
+ border-style: solid;
+ }
+ ::-webkit-scrollbar-track:vertical::-webkit-scrollbar-track:horizontal {
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ }
+ ::-webkit-scrollbar-thumb {
+ min-height: 28px;
+ padding-top: 100;
+ background-color: rgba(0, 0, 0, .2);
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset 0 -1px 0 rgba(0, 0, 0, .07);
+ }
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(0, 0, 0, .4);
+ -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);
+ }
+ ::-webkit-scrollbar-thumb:active {
+ background-color: rgba(0, 0, 0, .5);
+ -webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .35);
+ }
+ ::-webkit-scrollbar-track:vertical,
+ ::-webkit-scrollbar-track:horizontal,
+ ::-webkit-scrollbar-thumb:vertical,
+ ::-webkit-scrollbar-thumb:horizontal {
+ border-width: 0;
+ }
+ ::-webkit-scrollbar-track:hover {
+ background-color: rgba(0, 0, 0, .05);
+ -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1);
+ }
+ ::-webkit-scrollbar-track:active {
+ background-color: rgba(0, 0, 0, .05);
+ -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .14), inset -1px -1px 0 rgba(0, 0, 0, .07);
+ }
+ .scrollbar-hover::-webkit-scrollbar,
+ .scrollbar-hover::-webkit-scrollbar-button,
+ .scrollbar-hover::-webkit-scrollbar-track,
+ .scrollbar-hover::-webkit-scrollbar-thumb {
+ visibility: hidden;
+ }
+ .scrollbar-hover:hover::-webkit-scrollbar,
+ .scrollbar-hover:hover::-webkit-scrollbar-button,
+ .scrollbar-hover:hover::-webkit-scrollbar-track,
+ .scrollbar-hover:hover::-webkit-scrollbar-thumb {
+ visibility: visible;
+ }
}
table {
max-width: 100%;
@@ -4299,6 +4301,9 @@ table th[class*="col-"] {
.table-responsive > .table-bordered {
border: 0;
}
+ .table-responsive > .table-bordered th {
+ border-top: none;
+ }
.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
Oops, something went wrong.
View
@@ -1,5 +1,5 @@
/*!
- * ZUI: Document - v1.5.0 - 2016-09-05
+ * ZUI: Document - v1.5.0 - 2016-09-06
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
@@ -81,6 +81,7 @@
resource : {col: 1, row: 2},
contribution: {col: 1, row: 2}
};
+ var isTouchScreen = 'ontouchstart' in document.documentElement;
var LAST_RELOAD_ANIMATE_ID = 'lastReloadAnimate',
LAST_QUERY_ID = 'LAST_QUERY_ID',
INDEX_JSON = debug ? 'docs/index.json' : 'docs/index.min.json',
@@ -1214,6 +1215,7 @@
}
if(tagName === 'TABLE') {
$tag.addClass('table');
+ $tag = $('<div class="table-responsive"/>').append($tag);
}
if(checkFirstH1) {
if(tagName === 'H1') {
@@ -1430,12 +1432,14 @@
if(firstOpenPage) {
firstOpenPage = false;
$.zui.store.set('first_open_page', false);
- setTimeout(function() {
- $('#pageCloseBtn').tooltip('show').addClass('active');
+ if(!isTouchScreen) {
setTimeout(function() {
- $('#pageCloseBtn').tooltip('hide').removeClass('active');
- }, 6000);
- }, 500);
+ $('#pageCloseBtn').tooltip('show').addClass('active');
+ setTimeout(function() {
+ $('#pageCloseBtn').tooltip('hide').removeClass('active');
+ }, 6000);
+ }, 500);
+ }
}
}
}, 300);
@@ -1831,7 +1835,7 @@
clipboard.on('error', function(e) {
$('#copyCodeTip').addClass('tooltip-warning');
- $copyCodeBtn.tooltip('show', '按 <strong>Ctrl+C</strong> 完成复制');
+ $copyCodeBtn.tooltip('show', isTouchScreen ? '你的浏览器不支持直接复制,请自行选择并复制。' : '按 <strong>Ctrl+C</strong> 完成复制');
});
$copyCodeBtn.on('hide.zui.tooltip', function() {
@@ -1849,7 +1853,7 @@
$copyable.prepend($copyCodeBtn);
$copyCodeBtn.attr('data-clipboard-target', '#' + $copyableTarget.attr('id'));
$copyable.one('mouseleave', function() {
- $copyCodeBtn.detach();
+ $copyCodeBtn.detach();
});
});
}
@@ -2237,10 +2241,12 @@
// init theme
initTheme();
- // init tooltip
- $('[data-toggle="tooltip"]').tooltip({
- container: 'body'
- });
+ if(!isTouchScreen) {
+ // init tooltip
+ $('[data-toggle="tooltip"]').tooltip({
+ container: 'body'
+ });
+ }
};
init();
View
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 4c72ade

Please sign in to comment.