From cff6efde919277dd26339d1b99c80b063765e2b2 Mon Sep 17 00:00:00 2001 From: life Date: Tue, 23 Sep 2014 18:56:04 +0800 Subject: [PATCH] common page & animation --- app/views/Errors/404.html | 27 +- app/views/Errors/500.html | 29 +- app/views/Home/find_password.html | 48 +- app/views/Home/find_password2.html | 67 +-- app/views/Home/find_password2_timeout.html | 31 +- app/views/Home/header_box.html | 2 +- app/views/Home/login.html | 86 ++-- app/views/Home/register.html | 71 +-- messages/msg.en | 3 + messages/msg.zh | 3 + public/css/index.css | 518 ++++++++++++++++++++- public/css/index.less | 299 +++++++++++- public/css/theme/basic.less | 116 +++++ public/css/theme/default.css | 96 ++++ public/css/theme/simple.css | 96 ++++ public/css/theme/writting-overwrite.css | 96 ++++ public/css/theme/writting.css | 96 ++++ public/js/app/page-min.js | 2 +- public/js/app/page.js | 2 + 19 files changed, 1516 insertions(+), 172 deletions(-) diff --git a/app/views/Errors/404.html b/app/views/Errors/404.html index a0af392..5d38aa5 100644 --- a/app/views/Errors/404.html +++ b/app/views/Errors/404.html @@ -5,14 +5,31 @@
-

error-404

-
+
+

404

+
+
+

This page cann't found. -
- Back -

+

+ + +
+
+

+ leanote © 2014 +

+
+ {{end}} \ No newline at end of file diff --git a/app/views/Errors/500.html b/app/views/Errors/500.html index 93f95d3..e64da01 100644 --- a/app/views/Errors/500.html +++ b/app/views/Errors/500.html @@ -5,14 +5,31 @@
-

error-500

-
- Sorry, we got a error. -
- Back -
+
+

404

+
+
+

+ Sorry, we got an error. +

+ + +
+
+

+ leanote © 2014 +

+
+ {{end}} \ No newline at end of file diff --git a/app/views/Home/find_password.html b/app/views/Home/find_password.html index 7600b0b..9971d7a 100644 --- a/app/views/Home/find_password.html +++ b/app/views/Home/find_password.html @@ -1,32 +1,36 @@ {{template "home/header_box.html" .}} - -
+
-

leanote | {{msg . "findPassword"}}

-
-
- - - - - - - -
-
- -
-
-
+
+

+ {{msg . "login"}} +   + {{msg . "home"}} +

+

+ leanote © 2014 +

+
+ diff --git a/app/views/Home/find_password2.html b/app/views/Home/find_password2.html index 67d04e4..687e6b7 100644 --- a/app/views/Home/find_password2.html +++ b/app/views/Home/find_password2.html @@ -1,44 +1,45 @@ {{template "home/header_box.html" .}} -
+ +
-

leanote | {{msg . "updatePassword"}}

-
-
-
-
- - - - - - - - - - - - + - - - -
+

leanote

+
+
{{msg . "updatePassword"}}
+ +
+ +
+
{{.findPwd.Email}} -
- - - {{msg . "passwordTips"}} -
- - -
- -
-
+
+ + + {{msg . "passwordTips"}} +
+
+ + +
+ + +
+
+

+ {{msg . "login"}} +   + {{msg . "home"}} +

+

+ leanote © 2014 +

+
+ diff --git a/app/views/Home/find_password2_timeout.html b/app/views/Home/find_password2_timeout.html index f21e475..bf7800c 100644 --- a/app/views/Home/find_password2_timeout.html +++ b/app/views/Home/find_password2_timeout.html @@ -1,21 +1,30 @@ {{template "home/header_box.html" .}} -
+
-

leanote {{msg . "findPassword"}} - {{msg . "findPasswordTimeout"}}

-
-
- {{msg . "findPasswordTimeout"}}, {{msg . "reFindPassword"}} -
-
-
+
+

+ {{msg . "login"}} +   + {{msg . "home"}} +

+

+ leanote © 2014 +

+
+ diff --git a/app/views/Home/header_box.html b/app/views/Home/header_box.html index 0c988af..0a4698c 100644 --- a/app/views/Home/header_box.html +++ b/app/views/Home/header_box.html @@ -18,4 +18,4 @@ html, body { } - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/Home/login.html b/app/views/Home/login.html index 1ffea5d..29d5386 100644 --- a/app/views/Home/login.html +++ b/app/views/Home/login.html @@ -1,51 +1,57 @@ {{template "home/header_box.html" .}} -
+
+
-

leanote | {{msg . "login"}}

-
-
- - - - - - - - - - -
- - -
- - -
- -
- {{msg . "forgetPassword"}} - {{if .openRegister}} -
- {{msg . "register"}} - {{msg . "or"}} - {{msg . "try"}} -
- {{msg . "3th"}}: github - -
- {{end}} - -
-
-
+
+

+ {{msg . "home"}} +

+

+ leanote © 2014 +

+
+ @@ -98,7 +104,7 @@ $(function() { // github $("#github").click(function() { - $("#thirdLoginLoading").show(); + $(this).button("loading"); location.href="https://github.com/login/oauth/authorize?access_type=&approval_prompt=&client_id=3790fbf1fc14bc6c5d85&redirect_uri=http%3A%2F%2Fleanote.com%2Foauth%2FgithubCallback&response_type=code&scope=user&state="; }); }); diff --git a/app/views/Home/register.html b/app/views/Home/register.html index 0a97241..47bcf73 100644 --- a/app/views/Home/register.html +++ b/app/views/Home/register.html @@ -1,50 +1,51 @@ {{template "home/header_box.html" .}} -
+
+
-

leanote | {{msg . "register"}}

-
-
- - - - - - - +

leanote

+
+
{{msg . "register"}}
+ +
+
+ + +
+
+ + + {{msg . "passwordTips"}} +
+
+ + +
-
- - + - - - +
-
- - -
- - - {{msg . "passwordTips"}} -
- - -
- -
-
-
+
+

+ {{msg . "home"}} +

+

+ leanote © 2014 +

+
+ diff --git a/messages/msg.en b/messages/msg.en index ee2b8aa..d013452 100644 --- a/messages/msg.en +++ b/messages/msg.en @@ -48,6 +48,9 @@ wrongPassword=Wrong password logining=Sign in loginSuccess=login success ing=processing +use = Use +hadAcount = Already have an account? +hasAcount = Do not have an account? # 注册 registerSuccessAndRdirectToNote=register success, now redirect to my note... diff --git a/messages/msg.zh b/messages/msg.zh index ca7e96b..52cf557 100644 --- a/messages/msg.zh +++ b/messages/msg.zh @@ -48,6 +48,9 @@ wrongPassword=密码有误 logining=正在登录 loginSuccess=登录成功, 正在跳转 ing=正在处理 +use = 使用 +hadAcount = 已有帐户? +hasAcount = 还无帐户? # 注册 registerSuccessAndRdirectToNote=注册成功, 正在转至我的笔记... diff --git a/public/css/index.css b/public/css/index.css index e475bf3..c590a39 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -1 +1,517 @@ -@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url('../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url('../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url('../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url('../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff') format('woff')}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','微软雅黑',Arial,Tahoma,sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','微软雅黑',Arial,Tahoma,sans-serif}a{cursor:pointer}a:hover{text-decoration:none!important}#headerContainer{height:60px;background-color:#fff;-webkit-box-shadow:1px 1px 8px -1px rgba(0,0,0,0.1);box-shadow:1px 1px 8px rgba(0,0,0,0.1)}#postsContainer,#suggestion{background:#f5f5f5 url("../images/noise.png")}#postsContainer{margin-top:60px}section{background-color:#65bd77;color:#e2f3e5;margin-top:60px}.header{text-align:center;padding:30px}.header p{color:#d0ebd6;font-size:16px}.header .btn{padding:10px 16px;font-size:14px;font-size:18px;line-height:1.33;border-radius:2px;margin:20px 0}.header .btn-primary{background-color:#25313e;border-color:#1f2a34}.header h2{font-size:32px;color:#fff}.preview{margin:auto;width:850px;text-align:center}.preview .img-header{height:40px;width:750px;margin:auto;border-radius:5px 5px 0 0;text-align:left;background-color:#f4f4f4}.preview .img-header img{box-shadow:none;margin:10px;width:50px}.preview .mobile{position:absolute;bottom:0;right:0}.preview .mobile .mobile-header{padding:8px 15px;border-radius:14px 14px 0 0;text-align:center;background-color:#2e3e4e}.preview .mobile .mobile-header img{width:30px}.preview .mobile img{border:3px solid #2e3e4e;border-bottom:0;width:160px}#header{color:#000;position:relative;background-color:#fff}#header h1{margin:0;padding:0;line-height:45px}#blogNav{margin:0;padding:0;line-height:60px}#blogNav li{display:inline-block}#blogNav li a{display:inline-block;padding:0 10px;color:#1b252e}#blogNav li a:hover{background-color:#eee}#loginBtns{border-left:1px solid #eee;border-color:rgba(200,200,200,0.5);padding-left:10px;line-height:30px;margin-top:15px}#loginBtns a{display:inline-block;color:#1b252e;padding:0 10px}#loginBtns .btn-register{color:#fff;background-color:#8ec165;border-color:#8ec165;border-radius:2px}#posts{padding-top:10px}.btn{border-radius:0;border:0}.btn-primary{background-color:green}#loginContainer{position:relative}input{border-radius:0!important;border:0}.alert{border-radius:0;border:0;margin:0 0 5px 0;padding:5px;display:none}#loginForm{width:320px;position:absolute;right:0;top:100px;background-color:#30373f;z-index:999;padding:10px 20px;color:#fff;border-radius:5px}#registerForm{padding-bottom:20px}#footer{background-color:#1b252e;color:#9db1c5;border-top:1px solid #ccc;padding:30px 0}#footer a{color:#9db1c5}#footer .col-md-6{text-align:center}#footer #beian a{font-size:8px}#aboutLeanote h2{margin:20px 0;text-align:center}#aboutLeanote{padding:30px}#box{margin:0;color:#000;height:100%;padding-top:30px}#box h1{margin:auto;margin-bottom:20px;width:500px;color:#eee}#boxForm{background-color:#fff;width:500px;margin:auto;padding:20px;padding-top:15px;border-radius:5px}#boxForm table{width:100%}#boxForm table td{padding:5px 10px}.back{position:absolute;color:#fff;display:inline-block;font-size:20px}.back:hover{color:#eee}#quickLinks{width:500px;margin:auto;text-align:right}#quickLinks a{color:#fff}#quickLinks a:hover{color:#eee} \ No newline at end of file +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url('../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), url('../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), url('../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff') format('woff'); +} +/*"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, "Microsoft Yahei", Verdana, Simsun, "Segoe UI", "Segoe UI Web Regular", "Segoe UI Symbol", "BBAlpha Sans", "S60 Sans", Arial, sans-serif;*/ +::selection { + background: #000000; + color: #ffffff; +} +::-moz-selection { + background: #000000; + color: #ffffff; +} +::-webkit-selection { + background: #000000; + color: #ffffff; +} +*, +body { + font-family: 'Open Sans', '微软雅黑', Arial, Tahoma, sans-serif; + font-weight: 300; + font-size: 14px; + -webkit-font-smoothing: antialiased; +} +h1, +h2, +h3 { + font-family: 'Open Sans', '微软雅黑', Arial, Tahoma, sans-serif; +} +a { + cursor: pointer; +} +a:hover { + text-decoration: none !important; +} +#headerContainer { + height: 60px; + background-color: #fff; + -webkit-box-shadow: 1px 1px 8px -1px rgba(0, 0, 0, 0.1); + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.1); +} +#postsContainer, +#suggestion { + background: #f5f5f5 url("../images/noise.png"); +} +#postsContainer { + margin-top: 60px; +} +section { + background-color: #65bd77; + color: #e2f3e5; + margin-top: 60px; +} +.header { + text-align: center; + padding: 30px; +} +.header p { + color: #d0ebd6; + font-size: 16px; +} +.header .btn { + padding: 10px 16px; + font-size: 14px; + font-size: 18px; + line-height: 1.33; + border-radius: 2px; + margin: 20px 0; +} +.header .btn-primary { + background-color: #25313e; + border-color: #1f2a34; +} +.header h2 { + font-size: 32px; + color: #fff; +} +.preview { + margin: auto; + width: 850px; + text-align: center; +} +.preview .img-header { + height: 40px; + width: 750px; + margin: auto; + border-radius: 5px 5px 0 0; + text-align: left; + background-color: #F4F4F4; +} +.preview .img-header img { + box-shadow: none; + margin: 10px; + width: 50px; +} +.preview .mobile { + position: absolute; + bottom: 0px; + right: 0; +} +.preview .mobile .mobile-header { + padding: 8px 15px; + border-radius: 14px 14px 0 0; + text-align: center; + background-color: #2e3e4e; +} +.preview .mobile .mobile-header img { + width: 30px; +} +.preview .mobile img { + border: 3px solid #2e3e4e; + border-bottom: 0; + width: 160px; +} +/* header */ +#header { + color: #000000; + position: relative; + background-color: #fff; +} +#header h1 { + margin: 0; + padding: 0; + line-height: 45px; +} +#blogNav { + margin: 0; + padding: 0; + line-height: 60px; +} +#blogNav li { + display: inline-block; +} +#blogNav li a { + display: inline-block; + padding: 0 10px; + color: #1b252e; +} +#blogNav li a:hover { + background-color: #eee; +} +#loginBtns { + border-left: 1px solid #eee; + border-color: rgba(200, 200, 200, 0.5); + padding-left: 10px; + line-height: 30px; + margin-top: 15px; +} +#loginBtns a { + display: inline-block; + color: #1b252e; + padding: 0 10px; +} +#loginBtns .btn-register { + color: #fff; + background-color: #8ec165; + border-color: #8ec165; + border-radius: 2px; +} +/* posts */ +#posts { + padding-top: 10px; +} +.btn-primary { + background-color: green; +} +#loginContainer { + position: relative; +} +input, +.form-control { + border-radius: 2px !important; + border-color: #d9d9d9; + height: 40px; + padding: 10px 16px; +} +.form-control, +.form-control:focus { + -webkit-box-shadow: none; + box-shadow: none; +} +.alert { + border-radius: 2px; + border: none; + margin-bottom: 3px; + display: none; +} +#loginForm { + width: 320px; + position: absolute; + right: 0; + top: 100px; + background-color: #30373f; + z-index: 999; + padding: 10px 20px; + color: #fff; + border-radius: 5px; +} +#registerForm { + padding-bottom: 20px; +} +#footer { + background-color: #1b252e; + color: #9db1c5; + border-top: 1px solid #ccc; + padding: 30px 0; +} +#footer a { + color: #9db1c5; +} +#footer .col-md-6 { + text-align: center; +} +#footer #beian a { + font-size: 8px; +} +#aboutLeanote h2 { + margin: 20px 0; + text-align: center; +} +#aboutLeanote { + padding: 30px; +} +#boxBody { + background-color: #65bd77; +} +#box { + margin: 0; + color: #000; + padding-top: 30px; +} +#box h1 { + margin: auto; + margin-bottom: 20px; + width: 500px; + color: #eee; +} +#logo { + text-align: center; +} +#boxHeader { + border-color: #e8e8e8; + color: #333; + background-color: #f5f5f5; + border-radius: 2px 2px 0 0; + padding: 10px 15px; + border-bottom: 1px solid transparent; + text-align: center; + font-weight: bold; + font-size: 16px; +} +#boxForm { + background-color: #fff; + width: 500px; + margin: auto; + border-radius: 2px; +} +#boxForm form { + padding: 20px 30px; + padding-bottom: 30px; +} +#boxForm table { + width: 100%; +} +.back { + position: absolute; + color: #fff; + display: inline-block; + font-size: 20px; +} +.back:hover { + color: #eee; +} +#quickLinks { + width: 500px; + margin: auto; + text-align: right; +} +#quickLinks a { + color: #fff; +} +#quickLinks a:hover { + color: #eee; +} +.line { + height: 2px; + margin: 10px 0; + font-size: 0; + overflow: hidden; + background-color: transparent; + border-width: 0; + border-top: 1px solid #e8e8e8; +} +.line-dashed { + border-style: dashed; + background: transparent; +} +.btn { + font-weight: 500; + border-radius: 2px; + border-radius: 3px; +} +.btn-github { + padding-left: 12px; + padding-right: 12px; + color: #fff !important; + background-color: #335397; + border-color: #335397; +} +.btn-github:hover { + color: #fff !important; + background-color: #2d4984; + border-color: #294279; +} +.btn > i.pull-left, +.btn > i.pull-right { + line-height: 1.428571429; +} +.m-t-xs { + margin-top: 5px; +} +#boxFooter { + margin-top: 10px; + margin-bottom: 10px; + text-align: center; + color: #eee; +} +#boxFooter a { + color: #eee; +} +.h { + font-size: 170px; + font-weight: 300; + text-shadow: 0 1px 0 #d9d9d9, 0 2px 0 #d0d0d0, 0 5px 10px rgba(0, 0, 0, 0.125), 0 10px 20px rgba(0, 0, 0, 0.2); + text-align: center; +} +.list-group-item > .fa-chevron-right { + float: right; + margin-top: 4px; + margin-right: -5px; + color: #ccc; + margin-left: 10px; +} +#errorBox { + width: 500px; + margin: auto; + padding: 20px 30px; + padding-bottom: 30px; +} +#errorBox .error-info { + padding-bottom: 10px; + color: #fff; + font-size: 16px; + text-align: center; +} +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} +@-webkit-keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInDownBig { + 0% { + opacity: 0; + -moz-transform: translateY(-2000px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInDownBig { + 0% { + opacity: 0; + -o-transform: translateY(-2000px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInDownBig { + 0% { + opacity: 0; + transform: translateY(-2000px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + -moz-animation-name: fadeInDownBig; + -o-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; +} diff --git a/public/css/index.less b/public/css/index.less index 8797fe8..534bd35 100644 --- a/public/css/index.less +++ b/public/css/index.less @@ -1,4 +1,3 @@ - @bgColor: #fff; @headerBgColor: #fff; @fontFamily: 'Open Sans', '微软雅黑', Arial, Tahoma, sans-serif; @@ -51,6 +50,7 @@ html,body { font-family: @fontFamily; font-weight: 300; font-size: @fontSize; + -webkit-font-smoothing: antialiased; } h1, h2, h3 { font-family: @fontFamily; @@ -207,10 +207,6 @@ section { padding-top: 10px; } -.btn { - border-radius: 0px; - border: none; -} .btn-primary { background-color: green; } @@ -218,18 +214,24 @@ section { #loginContainer { position: relative; } - -input { - border-radius: 0 !important; - border: none; + +input, .form-control { + border-radius: 2px !important; + border-color: #d9d9d9; + height: 40px; + padding: 10px 16px; +} +.form-control, .form-control:focus { + -webkit-box-shadow: none; + box-shadow: none; } .alert { - border-radius: 0; + border-radius: 2px; border: none; - margin:0 0 5px 0; - padding:5px; + margin-bottom: 3px; display: none; } + #loginForm { width: 320px; position: absolute; @@ -279,12 +281,15 @@ input { padding: 30px; } //------------- +#boxBody { + background-color: #65bd77; +} @boxWidth: 500px; #box { margin: 0; color: #000; - height: 100%; padding-top: 30px; + h1 { width: @boxWidth;; margin: auto; @@ -293,17 +298,32 @@ input { color: #eee; } } +#logo { + text-align: center; +} +#boxHeader { + border-color: #e8e8e8; + color: #333; + background-color: #f5f5f5; + border-radius: 2px 2px 0 0; + padding: 10px 15px; + border-bottom: 1px solid transparent; + text-align: center; + font-weight: bold; + font-size: 16px; +} #boxForm { background-color: #fff; width: @boxWidth;; margin: auto; - padding: 20px; - padding-top: 15px; - border-radius: 5px; + border-radius: 2px; + form { + padding: 20px 30px; + padding-bottom: 30px; + } table { width: 100%; td { - padding: 5px 10px; } } } @@ -326,4 +346,249 @@ input { color: #eee; } } +} + +.line { + height: 2px; + margin: 10px 0; + font-size: 0; + overflow: hidden; + background-color: transparent; + border-width: 0; + border-top: 1px solid #e8e8e8; +} +.line-dashed { + border-style: dashed; + background: transparent; +} + +.btn { + font-weight: 500; + border-radius: 2px; + border-radius: 3px; +} +.btn-github { + padding-left: 12px; + padding-right: 12px; + color: #fff !important; + background-color: #335397; + border-color: #335397; +} +.btn-github:hover { + color: #fff !important; + background-color: #2d4984; + border-color: #294279; +} +.btn>i.pull-left, .btn>i.pull-right { + line-height: 1.428571429; +} +.m-t-xs { + margin-top: 5px; +} + +#boxFooter { + margin-top: 10px; + margin-bottom: 10px; + text-align: center; + color: #eee; + a { + color: #eee; + } +} + +// error +.h { + font-size: 170px; + font-weight: 300; + text-shadow: 0 1px 0 #d9d9d9,0 2px 0 #d0d0d0,0 5px 10px rgba(0,0,0,0.125),0 10px 20px rgba(0,0,0,0.2); + text-align: center; +} +.list-group-item>.fa-chevron-right { + float: right; + margin-top: 4px; + margin-right: -5px; + color: #ccc; + margin-left: 10px; +} +#errorBox { + width: @boxWidth;; + margin: auto; + padding: 20px 30px; + padding-bottom: 30px; + .error-info { + padding-bottom: 10px; + color: #fff; + font-size: 16px; + text-align: center; + } +} + +//-------- +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} + +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} + +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} + +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} +@-webkit-keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} + +@-moz-keyframes fadeInDownBig { + 0% { + opacity: 0; + -moz-transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} + +@-o-keyframes fadeInDownBig { + 0% { + opacity: 0; + -o-transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} + +@keyframes fadeInDownBig { + 0% { + opacity: 0; + transform: translateY(-2000px); + } + + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + -moz-animation-name: fadeInDownBig; + -o-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; } \ No newline at end of file diff --git a/public/css/theme/basic.less b/public/css/theme/basic.less index 67775ae..062bc29 100644 --- a/public/css/theme/basic.less +++ b/public/css/theme/basic.less @@ -441,4 +441,120 @@ float: right; } } +} + +//-------- +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} + +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} + +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} + +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; } \ No newline at end of file diff --git a/public/css/theme/default.css b/public/css/theme/default.css index 1b6a70c..ef48a48 100644 --- a/public/css/theme/default.css +++ b/public/css/theme/default.css @@ -400,6 +400,102 @@ #attachList li .attach-process { float: right; } +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} ::selection { background: #000000; color: #ffffff; diff --git a/public/css/theme/simple.css b/public/css/theme/simple.css index 1aa2e8f..a8121af 100644 --- a/public/css/theme/simple.css +++ b/public/css/theme/simple.css @@ -400,6 +400,102 @@ #attachList li .attach-process { float: right; } +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} ::selection { background: #000000; color: #ffffff; diff --git a/public/css/theme/writting-overwrite.css b/public/css/theme/writting-overwrite.css index c133c9b..7a03336 100644 --- a/public/css/theme/writting-overwrite.css +++ b/public/css/theme/writting-overwrite.css @@ -400,6 +400,102 @@ #attachList li .attach-process { float: right; } +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} @font-face { font-family: 'Open Sans'; font-style: normal; diff --git a/public/css/theme/writting.css b/public/css/theme/writting.css index 1d35de4..a5e6a4f 100644 --- a/public/css/theme/writting.css +++ b/public/css/theme/writting.css @@ -400,6 +400,102 @@ #attachList li .attach-process { float: right; } +.animated { + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -ms-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + -ms-animation-duration: 0.5s; + -o-animation-duration: 0.5s; + animation-duration: 0.5s; +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + -moz-animation-name: fadeIn; + -o-animation-name: fadeIn; + animation-name: fadeIn; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + } +} +@-moz-keyframes fadeInUp { + 0% { + opacity: 0; + -moz-transform: translateY(20px); + } + 100% { + opacity: 1; + -moz-transform: translateY(0); + } +} +@-o-keyframes fadeInUp { + 0% { + opacity: 0; + -o-transform: translateY(20px); + } + 100% { + opacity: 1; + -o-transform: translateY(0); + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.fadeInUp { + -webkit-animation-name: fadeInUp; + -moz-animation-name: fadeInUp; + -o-animation-name: fadeInUp; + animation-name: fadeInUp; +} @font-face { font-family: 'Open Sans'; font-style: normal; diff --git a/public/js/app/page-min.js b/public/js/app/page-min.js index e26f01d..67a27b4 100644 --- a/public/js/app/page-min.js +++ b/public/js/app/page-min.js @@ -1 +1 @@ -var em=new editorMode;var lineMove=false;var target=null;function stopResize3Columns(){if(lineMove){ajaxGet("/user/updateColumnWidth",{notebookWidth:UserInfo.NotebookWidth,noteListWidth:UserInfo.NoteListWidth},function(){})}lineMove=false;$(".noteSplit").css("background","none")}function resize3ColumnsEnd(notebookWidth,noteListWidth){if(notebookWidth<150||noteListWidth<100){}var noteWidth=$("body").width()-notebookWidth-noteListWidth;if(noteWidth<400){}$("#leftNotebook").width(notebookWidth);$("#notebookSplitter").css("left",notebookWidth);$("#noteAndEditor").css("left",notebookWidth);$("#noteList").width(noteListWidth);$("#noteSplitter").css("left",noteListWidth);$("#note").css("left",noteListWidth);UserInfo.NotebookWidth=notebookWidth;UserInfo.NoteListWidth=noteListWidth}function resize3Columns(event,isFromeIfr){if(isFromeIfr){event.clientX+=$("body").width()-$("#note").width()}var notebookWidth,noteListWidth;if(lineMove==true){if(target=="notebookSplitter"){notebookWidth=event.clientX;noteListWidth=$("#noteList").width();resize3ColumnsEnd(notebookWidth,noteListWidth)}else{notebookWidth=$("#leftNotebook").width();noteListWidth=event.clientX-notebookWidth;resize3ColumnsEnd(notebookWidth,noteListWidth)}resizeEditor()}}$(function(){$(".noteSplit").bind("mousedown",function(event){event.preventDefault();lineMove=true;$(this).css("background-color","#ccc");target=$(this).attr("id");$("#noteMask").css("z-index",99999)});$("body").bind("mouseup",function(event){stopResize3Columns();$("#noteMask").css("z-index",-1)});$("body").bind("mousemove",function(event){if(lineMove){event.preventDefault();resize3Columns(event)}});$("#moreBtn").click(function(){saveBookmark();var height=$("#mceToolbar").height();if(height<$("#popularToolbar").height()){$("#mceToolbar").height($("#popularToolbar").height());$(this).find("i").removeClass("fa-angle-down").addClass("fa-angle-up")}else{$("#mceToolbar").height(height/2);$(this).find("i").removeClass("fa-angle-up").addClass("fa-angle-down")}resizeEditor();restoreBookmark()});$(window).resize(function(){resizeEditor()});$(".folderHeader").click(function(){var body=$(this).next();var p=$(this).parent();if(!body.is(":hidden")){$(".folderNote").removeClass("opened").addClass("closed");p.removeClass("opened").addClass("closed");$(this).find(".fa-angle-down").removeClass("fa-angle-down").addClass("fa-angle-right")}else{$(".folderNote").removeClass("opened").addClass("closed");p.removeClass("closed").addClass("opened");$(this).find(".fa-angle-right").removeClass("fa-angle-right").addClass("fa-angle-down")}});tinymce.init({setup:function(ed){ed.on("keydown",Note.saveNote);ed.on("keydown",function(e){var num=e.which?e.which:e.keyCode;if(num==9){if(!e.shiftKey){var node=ed.selection.getNode();if(node.nodeName=="PRE"){ed.execCommand("mceInsertRawHTML",false," ")}else{ed.execCommand("mceInsertRawHTML",false,"    ")}}else{}e.preventDefault();e.stopPropagation();return false}});ed.on("click",function(e){$("body").trigger("click")});ed.on("click",function(){log(ed.selection.getNode())})},convert_urls:true,relative_urls:false,remove_script_host:false,selector:"#editorContent",content_css:["css/bootstrap.css","css/editor/editor.css"].concat(em.getWritingCss()),skin:"custom",language:LEA.locale,plugins:["autolink link leaui_image lists charmap hr","paste","searchreplace leanote_nav leanote_code tabfocus","table directionality textcolor codemirror"],toolbar1:"formatselect | forecolor backcolor | bold italic underline strikethrough | leaui_image | leanote_code | bullist numlist | alignleft aligncenter alignright alignjustify",toolbar2:"outdent indent blockquote | link unlink | table | hr removeformat | subscript superscript |searchreplace | code | pastetext | fontselect fontsizeselect",menubar:false,toolbar_items_size:"small",statusbar:false,url_converter:false,font_formats:"Arial=arial,helvetica,sans-serif;"+"Arial Black=arial black,avant garde;"+"Times New Roman=times new roman,times;"+"Courier New=courier new,courier;"+"Tahoma=tahoma,arial,helvetica,sans-serif;"+"Verdana=verdana,geneva;"+"宋体=SimSun;"+"新宋体=NSimSun;"+"黑体=SimHei;"+"微软雅黑=Microsoft YaHei",block_formats:"Header 1=h1;Header 2=h2;Header 3=h3; Header 4=h4;Pre=pre;Paragraph=p",codemirror:{indentOnInit:true,path:"CodeMirror",config:{lineNumbers:true},jsFiles:[]},paste_data_images:true});window.onbeforeunload=function(e){Note.curChangedSaveIt()};$("body").on("keydown",Note.saveNote)});var random=1;function scrollTo(self,tagName,text){var iframe=$("#editorContent_ifr").contents();var target=iframe.find(tagName+":contains("+text+")");random++;var navs=$('#leanoteNavContent [data-a="'+tagName+"-"+encodeURI(text)+'"]');var len=navs.size();for(var i=0;i=i+1){target=target.eq(i);var top=target.offset().top;var nowTop=iframe.scrollTop();var d=200;for(var i=0;i立即验证","success")}else{showAlert("#emailMsg",e.Msg||"邮件发送失败","danger")}},"#emailBtn")});$("#leanoteDialog").on("click","#pwdBtn",function(e){e.preventDefault();var oldPwd=$("#oldPwd").val();var pwd=$("#pwd").val();var pwd2=$("#pwd2").val();if(!oldPwd){showAlert("#pwdMsg","请输入旧密码","danger","#oldPwd");return}else{if(oldPwd.length<6){showAlert("#pwdMsg","密码长度至少6位","danger","#oldPwd");return}}if(!pwd){showAlert("#pwdMsg","请输入新密码","danger","#pwd");return}else{if(pwd.length<6){showAlert("#pwdMsg","密码长度至少6位","danger","#pwd");return}}if(!pwd2){showAlert("#pwdMsg","请重复输入新密码","danger","#pwd2");return}else{if(pwd!=pwd2){showAlert("#pwdMsg","两次密码输入不一致","danger","#pwd2");return}}hideAlert("#pwdMsg");post("/user/updatePwd",{oldPwd:oldPwd,pwd:pwd},function(e){if(e.Ok){showAlert("#pwdMsg","修改密码成功","success")}else{showAlert("#pwdMsg",e.Msg,"danger")}},"#pwdBtn")});if(!UserInfo.Verified){}$("#wrongEmail").click(function(){openSetInfoDialog(1)});$("#leanoteDialog").on("click",".reSendActiveEmail",function(){showDialog("reSendActiveEmailDialog",{title:"发送验证邮件",postShow:function(){ajaxGet("/user/reSendActiveEmail",{},function(ret){if(typeof ret=="object"&&ret.Ok){$("#leanoteDialog .text").html("发送成功!");$("#leanoteDialog .viewEmailBtn").removeClass("disabled");$("#leanoteDialog .viewEmailBtn").click(function(){hideDialog();var url=getEmailLoginAddress(UserInfo.Email);window.open(url,"_blank")})}else{$("#leanoteDialog .text").html("发送失败")}})}})});$("#leanoteDialog").on("click",".nowToActive",function(){var url=getEmailLoginAddress(UserInfo.Email);window.open(url,"_blank")});$("#notebook, #newMyNote, #myProfile, #topNav, #notesAndSort","#leanoteNavTrigger").bind("selectstart",function(e){e.preventDefault();return false});function updateLeftIsMin(is){ajaxGet("/user/updateLeftIsMin",{leftIsMin:is})}function minLeft(save){$("#leftNotebook").width(30);$("#notebook").hide();$("#noteAndEditor").css("left",30);$("#notebookSplitter").hide();$("#logo").hide();$("#leftSwitcher").hide();$("#leftSwitcher2").show();$("#leftNotebook .slimScrollDiv").hide();if(save){updateLeftIsMin(true)}}function maxLeft(save){$("#noteAndEditor").css("left",UserInfo.NotebookWidth);$("#leftNotebook").width(UserInfo.NotebookWidth);$("#notebook").show();$("#notebookSplitter").show();$("#leftSwitcher2").hide();$("#logo").show();$("#leftSwitcher").show();$("#leftNotebook .slimScrollDiv").show();if(save){updateLeftIsMin(false)}}$("#leftSwitcher2").click(function(){maxLeft(true)});$("#leftSwitcher").click(function(){minLeft(true)});function getMaxDropdownHeight(obj){var offset=$(obj).offset();var maxHeight=$(document).height()-offset.top;maxHeight-=70;if(maxHeight<0){maxHeight=0}var preHeight=$(obj).find("ul").height();return preHeight')},0);$("#noteItemListWrap, #notesAndSort").fadeOut();$("#noteList").hover(function(){$("#noteItemListWrap, #notesAndSort").fadeIn()},function(){$("#noteItemListWrap, #notesAndSort").fadeOut()});$("#mceToolbar").css("height","40px");this.resizeEditor();$("#noteList").width(250);$("#note").css("left",0)};editorMode.prototype.getWritingCss=function(){if(this.isWritingMode){return["css/editor/editor-writting-mode.css"]}return[]}; \ No newline at end of file +var em=new editorMode;var lineMove=false;var target=null;function stopResize3Columns(){if(lineMove){ajaxGet("/user/updateColumnWidth",{notebookWidth:UserInfo.NotebookWidth,noteListWidth:UserInfo.NoteListWidth},function(){})}lineMove=false;$(".noteSplit").css("background","none")}function resize3ColumnsEnd(notebookWidth,noteListWidth){if(notebookWidth<150||noteListWidth<100){}var noteWidth=$("body").width()-notebookWidth-noteListWidth;if(noteWidth<400){}$("#leftNotebook").width(notebookWidth);$("#notebookSplitter").css("left",notebookWidth);$("#noteAndEditor").css("left",notebookWidth);$("#noteList").width(noteListWidth);$("#noteSplitter").css("left",noteListWidth);$("#note").css("left",noteListWidth);UserInfo.NotebookWidth=notebookWidth;UserInfo.NoteListWidth=noteListWidth}function resize3Columns(event,isFromeIfr){if(isFromeIfr){event.clientX+=$("body").width()-$("#note").width()}var notebookWidth,noteListWidth;if(lineMove==true){if(target=="notebookSplitter"){notebookWidth=event.clientX;noteListWidth=$("#noteList").width();resize3ColumnsEnd(notebookWidth,noteListWidth)}else{notebookWidth=$("#leftNotebook").width();noteListWidth=event.clientX-notebookWidth;resize3ColumnsEnd(notebookWidth,noteListWidth)}resizeEditor()}}$(function(){$(".noteSplit").bind("mousedown",function(event){event.preventDefault();lineMove=true;$(this).css("background-color","#ccc");target=$(this).attr("id");$("#noteMask").css("z-index",99999)});$("body").bind("mouseup",function(event){stopResize3Columns();$("#noteMask").css("z-index",-1)});$("body").bind("mousemove",function(event){if(lineMove){event.preventDefault();resize3Columns(event)}});$("#moreBtn").click(function(){saveBookmark();var height=$("#mceToolbar").height();if(height<$("#popularToolbar").height()){$("#mceToolbar").height($("#popularToolbar").height());$(this).find("i").removeClass("fa-angle-down").addClass("fa-angle-up")}else{$("#mceToolbar").height(height/2);$(this).find("i").removeClass("fa-angle-up").addClass("fa-angle-down")}resizeEditor();restoreBookmark()});$(window).resize(function(){resizeEditor()});$(".folderHeader").click(function(){var body=$(this).next();var p=$(this).parent();if(!body.is(":hidden")){$(".folderNote").removeClass("opened").addClass("closed");p.removeClass("opened").addClass("closed");$(this).find(".fa-angle-down").removeClass("fa-angle-down").addClass("fa-angle-right")}else{$(".folderNote").removeClass("opened").addClass("closed");p.removeClass("closed").addClass("opened");$(this).find(".fa-angle-right").removeClass("fa-angle-right").addClass("fa-angle-down")}});tinymce.init({setup:function(ed){ed.on("keydown",Note.saveNote);ed.on("keydown",function(e){var num=e.which?e.which:e.keyCode;if(num==9){if(!e.shiftKey){var node=ed.selection.getNode();if(node.nodeName=="PRE"){ed.execCommand("mceInsertRawHTML",false," ")}else{ed.execCommand("mceInsertRawHTML",false,"    ")}}else{}e.preventDefault();e.stopPropagation();return false}});ed.on("click",function(e){$("body").trigger("click")});ed.on("click",function(){log(ed.selection.getNode())})},convert_urls:true,relative_urls:false,remove_script_host:false,selector:"#editorContent",content_css:["css/bootstrap.css","css/editor/editor.css"].concat(em.getWritingCss()),skin:"custom",language:LEA.locale,plugins:["autolink link leaui_image lists charmap hr","paste","searchreplace leanote_nav leanote_code tabfocus","table directionality textcolor codemirror"],toolbar1:"formatselect | forecolor backcolor | bold italic underline strikethrough | leaui_image | leanote_code | bullist numlist | alignleft aligncenter alignright alignjustify",toolbar2:"outdent indent blockquote | link unlink | table | hr removeformat | subscript superscript |searchreplace | code | pastetext | fontselect fontsizeselect",menubar:false,toolbar_items_size:"small",statusbar:false,url_converter:false,font_formats:"Arial=arial,helvetica,sans-serif;"+"Arial Black=arial black,avant garde;"+"Times New Roman=times new roman,times;"+"Courier New=courier new,courier;"+"Tahoma=tahoma,arial,helvetica,sans-serif;"+"Verdana=verdana,geneva;"+"宋体=SimSun;"+"新宋体=NSimSun;"+"黑体=SimHei;"+"微软雅黑=Microsoft YaHei",block_formats:"Header 1=h1;Header 2=h2;Header 3=h3; Header 4=h4;Pre=pre;Paragraph=p",codemirror:{indentOnInit:true,path:"CodeMirror",config:{lineNumbers:true},jsFiles:[]},paste_data_images:true});window.onbeforeunload=function(e){Note.curChangedSaveIt()};$("body").on("keydown",Note.saveNote)});var random=1;function scrollTo(self,tagName,text){var iframe=$("#editorContent_ifr").contents();var target=iframe.find(tagName+":contains("+text+")");random++;var navs=$('#leanoteNavContent [data-a="'+tagName+"-"+encodeURI(text)+'"]');var len=navs.size();for(var i=0;i=i+1){target=target.eq(i);var top=target.offset().top;var nowTop=iframe.scrollTop();var d=200;for(var i=0;i立即验证","success")}else{showAlert("#emailMsg",e.Msg||"邮件发送失败","danger")}},"#emailBtn")});$("#leanoteDialog").on("click","#pwdBtn",function(e){e.preventDefault();var oldPwd=$("#oldPwd").val();var pwd=$("#pwd").val();var pwd2=$("#pwd2").val();if(!oldPwd){showAlert("#pwdMsg","请输入旧密码","danger","#oldPwd");return}else{if(oldPwd.length<6){showAlert("#pwdMsg","密码长度至少6位","danger","#oldPwd");return}}if(!pwd){showAlert("#pwdMsg","请输入新密码","danger","#pwd");return}else{if(pwd.length<6){showAlert("#pwdMsg","密码长度至少6位","danger","#pwd");return}}if(!pwd2){showAlert("#pwdMsg","请重复输入新密码","danger","#pwd2");return}else{if(pwd!=pwd2){showAlert("#pwdMsg","两次密码输入不一致","danger","#pwd2");return}}hideAlert("#pwdMsg");post("/user/updatePwd",{oldPwd:oldPwd,pwd:pwd},function(e){if(e.Ok){showAlert("#pwdMsg","修改密码成功","success")}else{showAlert("#pwdMsg",e.Msg,"danger")}},"#pwdBtn")});if(!UserInfo.Verified){}$("#wrongEmail").click(function(){openSetInfoDialog(1)});$("#leanoteDialog").on("click",".reSendActiveEmail",function(){showDialog("reSendActiveEmailDialog",{title:"发送验证邮件",postShow:function(){ajaxGet("/user/reSendActiveEmail",{},function(ret){if(typeof ret=="object"&&ret.Ok){$("#leanoteDialog .text").html("发送成功!");$("#leanoteDialog .viewEmailBtn").removeClass("disabled");$("#leanoteDialog .viewEmailBtn").click(function(){hideDialog();var url=getEmailLoginAddress(UserInfo.Email);window.open(url,"_blank")})}else{$("#leanoteDialog .text").html("发送失败")}})}})});$("#leanoteDialog").on("click",".nowToActive",function(){var url=getEmailLoginAddress(UserInfo.Email);window.open(url,"_blank")});$("#notebook, #newMyNote, #myProfile, #topNav, #notesAndSort","#leanoteNavTrigger").bind("selectstart",function(e){e.preventDefault();return false});function updateLeftIsMin(is){ajaxGet("/user/updateLeftIsMin",{leftIsMin:is})}function minLeft(save){$("#leftNotebook").width(30);$("#notebook").hide();$("#noteAndEditor").css("left",30);$("#notebookSplitter").hide();$("#logo").hide();$("#leftSwitcher").hide();$("#leftSwitcher2").show();$("#leftNotebook .slimScrollDiv").hide();if(save){updateLeftIsMin(true)}}function maxLeft(save){$("#noteAndEditor").css("left",UserInfo.NotebookWidth);$("#leftNotebook").width(UserInfo.NotebookWidth);$("#notebook").show();$("#notebookSplitter").show();$("#leftSwitcher2").hide();$("#logo").show();$("#leftSwitcher").show();$("#leftNotebook .slimScrollDiv").show();if(save){updateLeftIsMin(false)}}$("#leftSwitcher2").click(function(){maxLeft(true)});$("#leftSwitcher").click(function(){minLeft(true)});function getMaxDropdownHeight(obj){var offset=$(obj).offset();var maxHeight=$(document).height()-offset.top;maxHeight-=70;if(maxHeight<0){maxHeight=0}var preHeight=$(obj).find("ul").height();return preHeight')},0);$("#noteItemListWrap, #notesAndSort").fadeOut();$("#noteList").hover(function(){$("#noteItemListWrap, #notesAndSort").fadeIn()},function(){$("#noteItemListWrap, #notesAndSort").fadeOut()});$("#mceToolbar").css("height","40px");$("#pageInner").addClass("animated fadeInUp");this.resizeEditor();$("#noteList").width(250);$("#note").css("left",0)};editorMode.prototype.getWritingCss=function(){if(this.isWritingMode){return["css/editor/editor-writting-mode.css"]}return[]}; \ No newline at end of file diff --git a/public/js/app/page.js b/public/js/app/page.js index cfc8849..789346d 100644 --- a/public/js/app/page.js +++ b/public/js/app/page.js @@ -811,6 +811,7 @@ editorMode.prototype.writtingMode = function() { $("#lock").css({right:0, bottom:0}); // $("#lock").animate({right:0}, 0); */ + $("#pageInner").removeClass("animated fadeInUp"); $("#themeLink").attr("href", "/css/theme/writting-overwrite.css"); @@ -831,6 +832,7 @@ editorMode.prototype.writtingMode = function() { // $("#lock").animate({right:w},1000); // $("body").fadeIn(); + $("#pageInner").addClass("animated fadeInUp"); this.resizeEditor();