From de7c60e66261c2f8a2f49fe2466ec9258341c9f4 Mon Sep 17 00:00:00 2001
From: codedrinker <gwangchunlei@gmail.com>
Date: Tue, 6 Aug 2019 07:14:06 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=86=E9=A2=91?=
 =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../community/controller/VideoController.java |  27 +++++++++++++
 src/main/resources/static/css/community.css   |   8 ++++
 src/main/resources/static/images/github.jpg   | Bin 0 -> 445915 bytes
 .../resources/static/images/spring-boot.jpg   | Bin 0 -> 511182 bytes
 .../static/images/spring-scheduled.jpg        | Bin 0 -> 385838 bytes
 src/main/resources/static/images/ucloud.png   | Bin 0 -> 191396 bytes
 src/main/resources/templates/navigation.html  |   7 +++-
 src/main/resources/templates/video.html       |  36 ++++++++++++++++++
 src/main/resources/templates/videos.html      |  25 ++++++++++++
 9 files changed, 102 insertions(+), 1 deletion(-)
 create mode 100644 src/main/java/life/majiang/community/controller/VideoController.java
 create mode 100644 src/main/resources/static/images/github.jpg
 create mode 100644 src/main/resources/static/images/spring-boot.jpg
 create mode 100644 src/main/resources/static/images/spring-scheduled.jpg
 create mode 100644 src/main/resources/static/images/ucloud.png
 create mode 100644 src/main/resources/templates/video.html
 create mode 100644 src/main/resources/templates/videos.html

diff --git a/src/main/java/life/majiang/community/controller/VideoController.java b/src/main/java/life/majiang/community/controller/VideoController.java
new file mode 100644
index 0000000..d9c7706
--- /dev/null
+++ b/src/main/java/life/majiang/community/controller/VideoController.java
@@ -0,0 +1,27 @@
+package life.majiang.community.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * Created by codedrinker on 2019/4/24.
+ */
+@Controller
+public class VideoController {
+
+    @GetMapping("/videos")
+    public String index() {
+        return "videos";
+    }
+
+    @GetMapping("/video")
+    public String video(@RequestParam(name = "aid") String aid,
+                        @RequestParam(name = "page", defaultValue = "1") String page,
+                        Model model) {
+        model.addAttribute("aid", aid);
+        model.addAttribute("page", page);
+        return "video";
+    }
+}
diff --git a/src/main/resources/static/css/community.css b/src/main/resources/static/css/community.css
index 7810853..c4c501e 100644
--- a/src/main/resources/static/css/community.css
+++ b/src/main/resources/static/css/community.css
@@ -139,4 +139,12 @@ body {
 .footer {
     text-align: center;
     color: #666;;
+}
+
+.video {
+    padding: 30px;
+}
+
+.video img {
+    width: 100%;
 }
\ No newline at end of file
diff --git a/src/main/resources/static/images/github.jpg b/src/main/resources/static/images/github.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..37ecbb52bfb15b48b02b4dcefebbe3ec002ad514
GIT binary patch
diff --git a/src/main/resources/static/images/spring-boot.jpg b/src/main/resources/static/images/spring-boot.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3bd546f254ed341c36b3a4ba0478ec6abce6604e
GIT binary patch
diff --git a/src/main/resources/static/images/spring-scheduled.jpg b/src/main/resources/static/images/spring-scheduled.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ec8209d706c5f0f2fc78612722e5d88195be5dd7
GIT binary patch
diff --git a/src/main/resources/static/images/ucloud.png b/src/main/resources/static/images/ucloud.png
new file mode 100644
index 0000000000000000000000000000000000000000..3156a9b66018f9b39caf0234e7872df437be8687
GIT binary patch
diff --git a/src/main/resources/templates/navigation.html b/src/main/resources/templates/navigation.html
index c43de1b..ba93139 100644
--- a/src/main/resources/templates/navigation.html
+++ b/src/main/resources/templates/navigation.html
@@ -23,9 +23,14 @@
                     <button type="submit" class="btn btn-default">搜索</button>
                 </form>
                 <ul class="nav navbar-nav">
-                    <li><a href="https://detail.youzan.com/show/goods/newest?alias=2xj0uxwujrwg6" target="_blank"
+                    <li>
+                        <a href="https://detail.youzan.com/show/goods/newest?alias=2xj0uxwujrwg6" target="_blank"
                            onclick="gtag('event', 'click', {'event_category': 'LINK','event_label': 'BOOK_STORE','transport_type': 'NAV'})">码匠书店</a>
                     </li>
+                    <li>
+                        <a href="/videos"
+                           onclick="gtag('event', 'click', {'event_category': 'LINK','event_label': 'VIDEO','transport_type': 'NAV'})">视频教程</a>
+                    </li>
                 </ul>
                 <ul class="nav navbar-nav navbar-right">
                     <li th:if="${session.user != null}">
diff --git a/src/main/resources/templates/video.html b/src/main/resources/templates/video.html
new file mode 100644
index 0000000..a86b446
--- /dev/null
+++ b/src/main/resources/templates/video.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+    <title>视频详情</title>
+    <head th:insert="~{import :: head}"></head>
+</head>
+<body>
+<div th:insert="~{navigation :: nav}"></div>
+<div class="container-fluid main">
+    <div class="row">
+        <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
+            <h4>视频选集</h4>
+            <ul class="question-related">
+                <li>
+                    <a th:href="@{/video(page=1,aid=${aid})}">P1 开篇介绍</a>
+                </li>
+                <li>
+                    <a th:href="@{/video(page=2,aid=${aid})}">P2 快速搭建 Spring Boot 项目</a>
+                </li>
+            </ul>
+        </div>
+        <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
+            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 30px;">
+                <iframe src="" th:src="@{//player.bilibili.com/player.html(aid=${aid},page=${page})}" scrolling="no"
+                        border="0" frameborder="no" framespacing="0" allowfullscreen="true"
+                        style="width: 100%;min-height:450px"></iframe>
+            </div>
+            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+
+            </div>
+        </div>
+    </div>
+</div>
+<div th:insert="~{footer :: foot}"></div>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/videos.html b/src/main/resources/templates/videos.html
new file mode 100644
index 0000000..13b6bc3
--- /dev/null
+++ b/src/main/resources/templates/videos.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+    <title>视频教程</title>
+    <head th:insert="~{import :: head}"></head>
+    <head th:insert="~{import :: markdown}"></head>
+</head>
+<body>
+<div th:insert="~{navigation :: nav}"></div>
+<div class="container-fluid main">
+    <div class="row">
+        <div class="col-md-4 col-sm-12 col-xs-12 video">
+            <a href="/video/av50200264"><img src="/images/spring-boot.jpg" alt=""></a>
+        </div>
+        <div class="col-md-4 col-sm-12 col-xs-12 video">
+            <a href="/video/av50200264"><img src="/images/spring-scheduled.jpg" alt=""></a>
+        </div>
+        <div class="col-md-4 col-sm-12 col-xs-12 video">
+            <a href="/video/av50200264"><img src="/images/github.jpg" alt=""></a>
+        </div>
+    </div>
+</div>
+<div th:insert="~{footer :: foot}"></div>
+</body>
+</html>
\ No newline at end of file

From 1dd40386f51184c32ec94856009b5570eba9c163 Mon Sep 17 00:00:00 2001
From: codedrinker <gwangchunlei@gmail.com>
Date: Tue, 6 Aug 2019 08:20:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=B8=83=E5=B1=80?=
 =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=AF=A6=E6=83=85=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/main/resources/templates/video.html | 44 +++++++++++++++----------
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/src/main/resources/templates/video.html b/src/main/resources/templates/video.html
index a86b446..1391828 100644
--- a/src/main/resources/templates/video.html
+++ b/src/main/resources/templates/video.html
@@ -8,27 +8,35 @@
 <div th:insert="~{navigation :: nav}"></div>
 <div class="container-fluid main">
     <div class="row">
-        <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
-            <h4>视频选集</h4>
-            <ul class="question-related">
-                <li>
-                    <a th:href="@{/video(page=1,aid=${aid})}">P1 开篇介绍</a>
-                </li>
-                <li>
-                    <a th:href="@{/video(page=2,aid=${aid})}">P2 快速搭建 Spring Boot 项目</a>
-                </li>
-            </ul>
-        </div>
-        <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
-            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 30px;">
-                <iframe src="" th:src="@{//player.bilibili.com/player.html(aid=${aid},page=${page})}" scrolling="no"
-                        border="0" frameborder="no" framespacing="0" allowfullscreen="true"
-                        style="width: 100%;min-height:450px"></iframe>
+        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+            <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12" style="padding: 30px;">
+                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+                    <iframe src="" th:src="@{//player.bilibili.com/player.html(aid=${aid},page=${page})}" scrolling="no"
+                            border="0" frameborder="no" framespacing="0" allowfullscreen="true"
+                            style="width: 100%;min-height:450px"></iframe>
+                </div>
+                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+                    <div class="btn-group">
+                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
+                                aria-haspopup="true" aria-expanded="false">
+                            视频选集 <span class="caret"></span>
+                        </button>
+                        <ul class="dropdown-menu">
+                            <li><a th:href="@{/video(page=1,aid=${aid})}">P1 开篇介绍</a></li>
+                            <li><a th:href="@{/video(page=2,aid=${aid})}">P2 快速搭建 Spring Boot 项目</a></li>
+                        </ul>
+                    </div>
+                </div>
             </div>
-            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
-
+            <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12" style="padding: 30px;">
+                <h4>视频笔记</h4>
+                这里是笔记
             </div>
         </div>
+        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 30px;">
+            <h4>评论区</h4>
+            这里是评论
+        </div>
     </div>
 </div>
 <div th:insert="~{footer :: foot}"></div>
