Commit 3c6ca13b authored by techird's avatar techird

add index.html

parents 6c6f9873 e9d87fe6
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"> <meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>百度脑图 - 便捷的思维导图工具</title> <title>百度脑图 - 便捷的思维编辑工具</title>
<script src="import.js?pack=edit" charset="utf-8"></script> <script src="import.js?pack=edit" charset="utf-8"></script>
<script src="kityminder.config.js" charset="utf-8"></script> <script src="kityminder.config.js" charset="utf-8"></script>
......
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="title" content="百度脑图(KityMinder)">
<meta name="keyword" content="kityminder,脑图,思维导图,kity,svg,minder,百度,fex,前端,在线">
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>百度脑图 - 便捷的思维编辑工具</title>
<script src="import.js?pack=index"></script>
<script>
$(function() {
var pattern = /(?:shareId|share_id)=(\w+)([&#]|$)/;
var match = pattern.exec(window.location) || pattern.exec(document.referrer);
if (match) {
window.location.href = 'viewshare.html?shareId=' + match[1];
return;
}
/* 初始化网盘使用的 APP 身份 */
fio.user.init({
apiKey: 'wiE55BGOG8BkGnpPs6UNtPbb'
});
$('hr').addClass('loading');
var $a = $('p.login a').hide();
fio.user.check().then(function(user) {
if (user) {
window.location.href = 'edit.html';
}
else {
$a.fadeIn(800);
$('hr').removeClass('loading');
}
});
$('p.login a').click(function() {
fio.user.login({
redirectUrl: window.location.href.split('index.html')[0] + 'edit.html'
});
$('hr').addClass('loading');
});
});
</script>
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
<link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed">
<style>
body, html {
margin: 0;
padding: 0;
overflow: hidden;
-webkit-user-select: none;
}
h1:before {
content: ' ';
display: block;
background: url(ui/theme/default/images/indexbackground.jpg) no-repeat;
background-size: cover;
position: absolute;
z-index: -1;
left: -10px;
top: -10px;
right: -10px;
bottom: -10px;
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-mz-filter: blur(5px);
-o-filter: blur(5px);
filter: url(ui/theme/default/images/blur.svg#blur);
filter: blur(5px);
}
h1:after {
content: ' ';
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, .75);
z-index: -1;
}
h1, p {
font-weight: 100;
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
h1 {
margin: 0;
margin-top: 200px;
color: white;
font-size: 50px;
line-height: 1.4em;
}
hr {
height: 0;
border: none;
border-bottom: 1px solid #F98183;
width: 110px;
margin: 40px auto;
transition: transform 0.5s ease;
}
hr.loading {
-webkit-animation: slide 1.33s ease-in-out infinite alternate;
animation: slide 1.33s ease-in-out infinite alternate;
}
@-webkit-keyframes slide {
0% { transform: translate3d(-100px, 0, 0); }
100% { transform: translate3d(100px, 0, 0); }
}
@keyframes slide {
0% { transform: translate3d(-100px, 0, 0); }
100% { transform: translate3d(100px, 0, 0); }
}
p.description {
color: #CCC;
font-size: 20px;
line-height: 1.8em;
}
p.login a {
display: inline-block;
width: 200px;
height: 60px;
background: #F98183;
font-size: 24px;
line-height: 60px;
text-align: center;
border-radius: 30px;
color: white;
text-shadow: 0 1px 0 #F8474F;
cursor: pointer;
position: relative;
overflow: hidden;
margin-top: 50px;
}
p.login a:active {
background: #FF6161;
transform: scale(0.95);
}
p.login a:before {
content: ' ';
display: block;
background: rgba(255, 255, 255, .2);
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-radius: 30px;
transform: scale(0, 1);
transition: transform 0.3s ease;
}
p.login a:hover:before {
transform: scale(1, 1);
}
</style>
</head>
<body>
<h1>百度脑图 <br/> 便捷的思维编辑工具</h1>
<hr />
<p class="description">
线上直接创建、保存并分享您的思路<br />
更加高效地工作或学习
</p>
<p class="login">
<a>立即体验</a>
</p>
</body>
<!--Baidu Tongji Code-->
<script type="text/javascript">
if (document.domain == 'naotu.baidu.com') {
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0703917f224067c887f3664479a03887' type='text/javascript'%3E%3C/script%3E"));
}
</script>
</html>
\ No newline at end of file
Subproject commit cfeb9b6ff9986033c397d6d06858cb421ace2c0b Subproject commit e291def2561ddc70b0e7d6e12bad30bc5a34402a
...@@ -75,6 +75,7 @@ KityMinder.registerUI('doc', function(minder) { ...@@ -75,6 +75,7 @@ KityMinder.registerUI('doc', function(minder) {
} }
function checkSaved() { function checkSaved() {
if (!fio.user.current()) return true;
return saved || window.confirm(minder.getLang('ui.unsavedcontent', '* ' + current.title)); return saved || window.confirm(minder.getLang('ui.unsavedcontent', '* ' + current.title));
} }
......
...@@ -82,7 +82,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -82,7 +82,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
window.onbeforeunload = function() { window.onbeforeunload = function() {
var noask = window.location.href.indexOf('noask') > 0; var noask = window.location.href.indexOf('noask') > 0;
if (!$doc.checkSave() && !noask) if (!$doc.checkSaved() && !noask)
return minder.getLang('ui.unsavedcontent', '* ' + $doc.current().title); return minder.getLang('ui.unsavedcontent', '* ' + $doc.current().title);
}; };
......
...@@ -45,10 +45,17 @@ KityMinder.registerUI('ribbon/tabs', function(minder) { ...@@ -45,10 +45,17 @@ KityMinder.registerUI('ribbon/tabs', function(minder) {
$tab.appearence = $tab.getPanel(1); $tab.appearence = $tab.getPanel(1);
$tab.view = $tab.getPanel(2); $tab.view = $tab.getPanel(2);
$tab.select(memory.get('ribbon-tab-index') || 0); var rememberIndex = memory.get('ribbon-tab-index');
if (memory.get('ribbon-tab-collapsed')) { var rememberCollapse = memory.get('ribbon-tab-collapsed');
$tab.select(rememberIndex || 0);
if (rememberCollapse) {
$container.addClass('collapsed'); $container.addClass('collapsed');
$header.addClass('collapsed'); $header.addClass('collapsed');
} else {
$container.removeClass('collapsed');
$header.removeClass('collapsed');
} }
return $tab; return $tab;
}); });
\ No newline at end of file
...@@ -129,14 +129,6 @@ input[type=url] { ...@@ -129,14 +129,6 @@ input[type=url] {
from { transform: rotate(0); } from { transform: rotate(0); }
to { transform: rotate(360deg); } to { transform: rotate(360deg); }
} }
@-moz-keyframes rotate {
from { transform: rotate(0); }
to { transform: rotate(360deg); }
}
@-ms-keyframes rotate {
from { transform: rotate(0); }
to { transform: rotate(360deg); }
}
@keyframes rotate { @keyframes rotate {
from { transform: rotate(0); } from { transform: rotate(0); }
to { transform: rotate(360deg); } to { transform: rotate(360deg); }
...@@ -146,14 +138,6 @@ input[type=url] { ...@@ -146,14 +138,6 @@ input[type=url] {
from { opacity: 0; } from { opacity: 0; }
to { opacity: 1; } to { opacity: 1; }
} }
@-moz-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@-ms-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fadeIn { @keyframes fadeIn {
from { opacity: 0; } from { opacity: 0; }
to { opacity: 1; } to { opacity: 1; }
...@@ -163,14 +147,6 @@ input[type=url] { ...@@ -163,14 +147,6 @@ input[type=url] {
from { opacity: 1; } from { opacity: 1; }
to { opacity: 0; } to { opacity: 0; }
} }
@-moz-keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
@-ms-keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
@keyframes fadeOut { @keyframes fadeOut {
from { opacity: 1; } from { opacity: 1; }
to { opacity: 0; } to { opacity: 0; }
......
...@@ -229,8 +229,7 @@ ...@@ -229,8 +229,7 @@
font-size: 16px; font-size: 16px;
padding-left: 15px; padding-left: 15px;
border-bottom: none; border-bottom: none;
position: absolute; .dock;
width: 100%;
} }
.priority { .priority {
height: 20px; height: 20px;
...@@ -310,16 +309,18 @@ ...@@ -310,16 +309,18 @@
padding: 3px 5px; padding: 3px 5px;
border-radius: 2px; border-radius: 2px;
font-size: 12px; font-size: 12px;
line-height: 16px;
color: rgb(77, 65, 0); color: rgb(77, 65, 0);
vertical-align: middle; vertical-align: middle;
margin-left: 8px; margin: 14px 8px;
float: right;
} }
.hyperlink { .hyperlink {
display: inline-block; display: block;
/* float: left; */ float: right;
width: 30px; width: 30px;
height: 20px; height: 20px;
margin-left: 15px; margin: 15px;
padding: 0; padding: 0;
background: url(../images/icons.png) no-repeat 0 -80px; background: url(../images/icons.png) no-repeat 0 -80px;
background-size: 20px; background-size: 20px;
...@@ -355,11 +356,14 @@ ...@@ -355,11 +356,14 @@
.dock; .dock;
} }
.text { .text {
width:12em; display: block;
white-space:nowrap; white-space: nowrap;
text-overflow:ellipsis; text-overflow: ellipsis;
-o-text-overflow:ellipsis; -o-text-overflow: ellipsis;
overflow:hidden; overflow: hidden;
vertical-align: middle; vertical-align: middle;
} }
.cur-root .text {
color: white;
}
} }
\ No newline at end of file
...@@ -666,22 +666,6 @@ input[type=url]:focus { ...@@ -666,22 +666,6 @@ input[type=url]:focus {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
@-moz-keyframes rotate {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
@-ms-keyframes rotate {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
@keyframes rotate { @keyframes rotate {
from { from {
transform: rotate(0); transform: rotate(0);
...@@ -698,22 +682,6 @@ input[type=url]:focus { ...@@ -698,22 +682,6 @@ input[type=url]:focus {
opacity: 1; opacity: 1;
} }
} }
@-moz-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-ms-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn { @keyframes fadeIn {
from { from {
opacity: 0; opacity: 0;
...@@ -730,22 +698,6 @@ input[type=url]:focus { ...@@ -730,22 +698,6 @@ input[type=url]:focus {
opacity: 0; opacity: 0;
} }
} }
@-moz-keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@-ms-keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeOut { @keyframes fadeOut {
from { from {
opacity: 1; opacity: 1;
...@@ -3099,7 +3051,10 @@ div.right { ...@@ -3099,7 +3051,10 @@ div.right {
padding-left: 15px; padding-left: 15px;
border-bottom: none; border-bottom: none;
position: absolute; position: absolute;
width: 100%; top: 0;
right: 0;
bottom: 0;
left: 0;
} }
.shared-content .priority { .shared-content .priority {
height: 20px; height: 20px;
...@@ -3179,16 +3134,18 @@ div.right { ...@@ -3179,16 +3134,18 @@ div.right {
padding: 3px 5px; padding: 3px 5px;
border-radius: 2px; border-radius: 2px;
font-size: 12px; font-size: 12px;
line-height: 16px;
color: #4d4100; color: #4d4100;
vertical-align: middle; vertical-align: middle;
margin-left: 8px; margin: 14px 8px;
float: right;
} }
.shared-content .hyperlink { .shared-content .hyperlink {
display: inline-block; display: block;
/* float: left; */ float: right;
width: 30px; width: 30px;
height: 20px; height: 20px;
margin-left: 15px; margin: 15px;
padding: 0; padding: 0;
background: url(../images/icons.png) no-repeat 0 -80px; background: url(../images/icons.png) no-repeat 0 -80px;
background-size: 20px; background-size: 20px;
...@@ -3236,13 +3193,16 @@ div.right { ...@@ -3236,13 +3193,16 @@ div.right {
left: 0; left: 0;
} }
.shared-content .text { .shared-content .text {
width: 12em; display: block;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
vertical-align: middle; vertical-align: middle;
} }
.shared-content .cur-root .text {
color: white;
}
.command-button .fui-icon { .command-button .fui-icon {
background: url(../images/icons.png) no-repeat; background: url(../images/icons.png) no-repeat;
background-position: 0 20px; background-position: 0 20px;
......
This diff is collapsed.
...@@ -14,16 +14,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) { ...@@ -14,16 +14,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
$('<div class="back"></div>').appendTo('#m-logo'); $('<div class="back"></div>').appendTo('#m-logo');
var treeData; var treeData;
var $curView=$('<div>'); var $curView=$('<div id="curView">');
var $preView=$('<div>'); var $preView=$('<div id="preView">');
minder.on('uiready', function() { minder.on('uiready', function() {
var shareView = minder.getUI('menu/share/m-share'); var shareView = minder.getUI('menu/share/m-share');
shareView.ready.then(function(){ shareView.ready.then(function(){
treeData = addParentPointer(minder); treeData = addParentPointer(minder);
$curView = renderNodeData(treeData, minder, $curView); renderNodeData(treeData, minder, $curView);
$preView = renderNodeData(treeData, minder, $preView); renderNodeData(treeData, minder, $preView);
$('#km-list-view').append($curView); $('#km-list-view').append($curView);
$('#km-list-view').append($preView); $('#km-list-view').append($preView);
$preView.css('x', '100%'); $preView.css('x', '100%');
...@@ -48,11 +48,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) { ...@@ -48,11 +48,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
$('#km-list-view').delegate('li', 'click', function(){ $('#km-list-view').delegate('li', 'click', function(){
var preViewData = $(this).data(); var preViewData = $(this).data();
renderNodeData(preViewData, minder, $preView);
if (preViewData.children) { if (preViewData.children) {
renderNodeData(preViewData, minder, $preView);
// $curView.css('x');
// console.log($preView.css('x'));
$preView.css('x', parseInt($curView.css('x')) + 100 + '%');
// console.log($preView.css('x'));
// $('#km-list-view').css('x', '0');
$('#km-list-view').transition({ $('#km-list-view').transition({
x: '-100%', x: parseInt($('#km-list-view').css('x')) - 100 + '%',
duration: 200, duration: 200,
easing: 'ease', easing: 'ease',
complete: function(){ complete: function(){
...@@ -70,11 +75,14 @@ KityMinder.registerUI('topbar/switch-view', function(minder) { ...@@ -70,11 +75,14 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
}); });
$('.back').on('click', function(){ $('.back').on('click', function(){
var parentViewData = $('.cur-root').data(); var parentViewData = $('.cur-root', $curView).data();
$preView.css('x', '0'); renderNodeData(parentViewData, minder, $preView);
$preView.css('x', parseInt($curView.css('x')) - 100 + '%');
// $curView.css('x');
// $('#km-list-view').css('x', '-100%');
$('#km-list-view').transition({ $('#km-list-view').transition({
x: '0', x: parseInt($('#km-list-view').css('x')) + 100 + '%',
duration: 200, duration: 200,
easing: 'ease', easing: 'ease',
complete: function(){ complete: function(){
...@@ -135,6 +143,7 @@ function renderNodeData(node, minder, $target){ ...@@ -135,6 +143,7 @@ function renderNodeData(node, minder, $target){
}); });
} }
// debugger;
return $target.html($curRoot.add($curList)); return $target.html($curRoot.add($curList));
} }
...@@ -167,7 +176,7 @@ function createListNode(node, minder){ ...@@ -167,7 +176,7 @@ function createListNode(node, minder){
// 处理子节点 // 处理子节点
if (node.children){ if (node.children){
$list.addClass('clickable'); $list.addClass('clickable');
$list.append('<span class="next-level"></span>'); $list.children().first().before('<span class="next-level"></span>');
$list.data(node); $list.data(node);
} }
...@@ -193,8 +202,6 @@ function getNodeHtml (node, minder){ ...@@ -193,8 +202,6 @@ function getNodeHtml (node, minder){
html += '<div class="progress progress-' + data.progress + '"></div>' html += '<div class="progress progress-' + data.progress + '"></div>'
} }
// 处理文字
html += '<span class="text">' + (data.text || '') + '</span>';
// 处理超链接 // 处理超链接
if (data.hyperlink) { if (data.hyperlink) {
html +='<a class="hyperlink" href="'+ data.hyperlink +'" target="_blank"></a>'; html +='<a class="hyperlink" href="'+ data.hyperlink +'" target="_blank"></a>';
...@@ -206,6 +213,9 @@ function getNodeHtml (node, minder){ ...@@ -206,6 +213,9 @@ function getNodeHtml (node, minder){
}); });
} }
// 处理文字
if (data.text) {
html += '<span class="text">' + (data.text || '') + '</span>';
}
return html; return html;
} }
...@@ -111,7 +111,7 @@ KityMinder.registerUI('topbar/user', function(minder) { ...@@ -111,7 +111,7 @@ KityMinder.registerUI('topbar/user', function(minder) {
$loginButton.show(); $loginButton.show();
$userButton.hide(); $userButton.hide();
fio.user.fire('logout'); fio.user.fire('logout');
window.location.href = window.location.href; // refresh window.location.href = window.location.href.split('edit.html')[0] + 'index.html'; // refresh
} }
function login() { function login() {
......
...@@ -9,6 +9,26 @@ ...@@ -9,6 +9,26 @@
<title>百度脑图 - 便捷的思维导图工具</title> <title>百度脑图 - 便捷的思维导图工具</title>
<!--Judge whether it is mobile visited -->
<script>
function browserRedirect() {
var sUserAgent= navigator.userAgent.toLowerCase();
var bIsIpad= sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp= sUserAgent.match(/midp/i) == "midp";
var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid= sUserAgent.match(/android/i) == "android";
var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile";
if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
window.location.href= window.location.href.replace('viewshare.html', 'm-share.html');
}
}
browserRedirect();
</script>
<script src="import.js?pack=share" charset="utf-8"></script> <script src="import.js?pack=share" charset="utf-8"></script>
<script src="kityminder.config.js" charset="utf-8"></script> <script src="kityminder.config.js" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js" charset="utf-8"></script> <script src="lang/zh-cn/zh-cn.js" charset="utf-8"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment