diff --git a/pom.xml b/pom.xml index 87e7c13..9c6bbc4 100644 --- a/pom.xml +++ b/pom.xml @@ -114,6 +114,12 @@ aliyun-sdk-oss 2.5.0 + + + com.sun.mail + javax.mail + 1.6.2 + org.springframework.boot diff --git a/src/main/java/com/quinn/intergration/SendBMail.java b/src/main/java/com/quinn/intergration/SendBMail.java new file mode 100644 index 0000000..1f90fc3 --- /dev/null +++ b/src/main/java/com/quinn/intergration/SendBMail.java @@ -0,0 +1,56 @@ +package com.quinn.intergration; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import javax.mail.Authenticator; +import javax.mail.Message; +import javax.mail.PasswordAuthentication; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; +import java.util.Properties; + +/** + * 使用@multiavatar生成头像 + * https://api.multiavatar.com/ + */ +public enum SendBMail { + + INSTANCE; + private static final Logger log = LoggerFactory.getLogger(SendBMail.class); + final String username = "quinn.admin@88.com"; + final String password = "Y3YYd4hcY2fFB9VY"; + boolean isSSL = true; + String host = "smtp.88.com"; + int port = 465; + boolean isAuth = true; + String from = "quinn.admin@88.com"; + + public boolean sendMail(String registerCode,String toEmail){ + Properties props = new Properties(); + props.put("mail.smtp.ssl.enable", isSSL); + props.put("mail.smtp.host", host); + props.put("mail.smtp.port", port); + props.put("mail.smtp.auth", isAuth); + Session session = Session.getDefaultInstance(props, new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + try { + Message message = new MimeMessage(session); + message.setFrom(new InternetAddress(from)); + message.setSubject(""); + message.setContent("","text/html;charset=UTF-8"); + message.addRecipient(Message.RecipientType.TO, new InternetAddress(toEmail)); + Transport.send(message); + } catch (Exception e) { + log.error("发送邮件失败",e); + return false; + } + return true; + } + +} diff --git a/src/main/resources/static/css/backgroud.css b/src/main/resources/static/css/backgroud.css new file mode 100644 index 0000000..cf4dddf --- /dev/null +++ b/src/main/resources/static/css/backgroud.css @@ -0,0 +1,17 @@ +body { + background: url(/images/menu/login.png) no-repeat; + background-size: 100% 100%; + background-attachment: fixed; +} + +main { + opacity: 0.9; +} + +#login_box { + padding: 35px; + border-radius: 15px; /*div圆角*/ + background: #56666B; + color: white; + opacity: 0.9; +} diff --git a/src/main/resources/static/css/login.css b/src/main/resources/static/css/login.css deleted file mode 100644 index fdb9a5b..0000000 --- a/src/main/resources/static/css/login.css +++ /dev/null @@ -1,44 +0,0 @@ -html, -body { - height: 100%; -} - -body { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - padding-top: 40px; - padding-bottom: 40px; - background-color: #f5f5f5; -} - -.form-signin { - width: 100%; - max-width: 330px; - padding: 15px; - margin: auto; -} -.form-signin .checkbox { - font-weight: 400; -} -.form-signin .form-control { - position: relative; - box-sizing: border-box; - height: auto; - padding: 10px; - font-size: 16px; -} -.form-signin .form-control:focus { - z-index: 2; -} -.form-signin input[type="email"] { - margin-bottom: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.form-signin input[type="password"] { - margin-bottom: 10px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} diff --git a/src/main/resources/static/images/menu/login.png b/src/main/resources/static/images/menu/login.png new file mode 100644 index 0000000..81dac63 Binary files /dev/null and b/src/main/resources/static/images/menu/login.png differ diff --git a/src/main/resources/templates/blog/editor.html b/src/main/resources/templates/blog/editor.html index f0a3d5c..80db4cf 100644 --- a/src/main/resources/templates/blog/editor.html +++ b/src/main/resources/templates/blog/editor.html @@ -6,7 +6,7 @@ 论坛-Quinn - + - +
-
diff --git a/src/main/resources/templates/blog/list.html b/src/main/resources/templates/blog/list.html index 6b5f36a..83b7d8d 100644 --- a/src/main/resources/templates/blog/list.html +++ b/src/main/resources/templates/blog/list.html @@ -5,6 +5,7 @@ 论坛-Quinn + - +
-
@@ -128,7 +128,6 @@
-
返回顶部 diff --git a/src/main/resources/templates/blog/read.html b/src/main/resources/templates/blog/read.html index 427bb89..4b3ea29 100644 --- a/src/main/resources/templates/blog/read.html +++ b/src/main/resources/templates/blog/read.html @@ -6,7 +6,7 @@ 论坛-Quinn - + - +
-
diff --git a/src/main/resources/templates/blog/write.html b/src/main/resources/templates/blog/write.html index 7ba8986..16931c4 100644 --- a/src/main/resources/templates/blog/write.html +++ b/src/main/resources/templates/blog/write.html @@ -6,7 +6,7 @@ 论坛-Quinn - + - +
diff --git a/src/main/resources/templates/common/header.html b/src/main/resources/templates/common/header.html index 20ca871..f40c79e 100644 --- a/src/main/resources/templates/common/header.html +++ b/src/main/resources/templates/common/header.html @@ -4,7 +4,7 @@
- - diff --git a/src/main/resources/templates/error/4xx.html b/src/main/resources/templates/error/4xx.html index 5c8d36f..4b27f08 100644 --- a/src/main/resources/templates/error/4xx.html +++ b/src/main/resources/templates/error/4xx.html @@ -5,7 +5,7 @@ 关于我们-Quinn - +
diff --git a/src/main/resources/templates/error/5xx.html b/src/main/resources/templates/error/5xx.html index 668c5b8..50c348e 100644 --- a/src/main/resources/templates/error/5xx.html +++ b/src/main/resources/templates/error/5xx.html @@ -5,7 +5,7 @@ 关于我们-Quinn - +
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index d0465f4..1e0683f 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,6 +5,7 @@ 首页-Quinn + diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index b945b0d..5d71cc1 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -5,35 +5,47 @@ 登录-Quinn - + + -