Skip to content

Commit

Permalink
refactor: html 중복 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
school0bhy committed Jul 20, 2019
1 parent dc26841 commit 2d79e10
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 219 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/templates/article-edit.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<head th:include="includes/article_js :: article_js"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<th:block th:include="includes/article_js :: article_js"></th:block>
<link rel="stylesheet" href="/static/css/index.css">
<link rel="stylesheet" href="/static/css/article-edit.css">
</head>
Expand Down Expand Up @@ -54,7 +54,7 @@
</form>
</div>

<body th:include="includes/js :: common_js"></body>
<th:block th:include="includes/js :: common_js"></th:block>

<script src="https://uicdn.toast.com/tui-editor/latest/tui-editor-Editor-full.js"></script>
<script type="text/javascript" th:inline="javascript">
Expand Down
11 changes: 4 additions & 7 deletions src/main/resources/templates/article.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<head th:include="includes/article_js :: article_js"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<th:block th:include="includes/article_js :: article_js"></th:block>
<link rel="stylesheet" href="/static/css/article.css">
</head>
<body>
Expand Down Expand Up @@ -107,10 +107,7 @@ <h1 th:text="${article.title}" class="text-center cover-title"></h1>
</div>
</div>
</div>


<body th:include="includes/js :: common_js"></body>

<th:block th:include="includes/js :: common_js"></th:block>
<script src="https://uicdn.toast.com/tui-editor/latest/tui-editor-Editor-full.js"></script>
<script type="text/javascript" th:inline="javascript">
/* <![CDATA[ */
Expand Down
15 changes: 6 additions & 9 deletions src/main/resources/templates/includes/article_js.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<!DOCTYPE html>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body th:fragment="article_js">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/codemirror.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor.css">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor-contents.css">
</body>
</html>
<th:block th:fragment="article_js">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/codemirror.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor.css">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor-contents.css">
</th:block>
17 changes: 0 additions & 17 deletions src/main/resources/templates/includes/common_css.html

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/resources/templates/includes/common_js.html

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/resources/templates/includes/common_meta.html

This file was deleted.

7 changes: 2 additions & 5 deletions src/main/resources/templates/includes/css.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="common_css">
<th:block th:fragment="common_css">
<link rel="shortcut icon" href="/static/images/logo/favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-icons@0.1.2/css/themify-icons.css">
Expand All @@ -13,5 +11,4 @@
<link rel="stylesheet" href="/static/css/app.css">
<link rel="stylesheet" href="/static/css/customize.css">
<link rel="stylesheet" href="/static/css/main.css">
</head>
</html>
</th:block>
19 changes: 0 additions & 19 deletions src/main/resources/templates/includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
<th:block th:fragment="footer">
<footer class="content-footer">
<div class="footer">
Expand All @@ -10,21 +9,3 @@
</div>
</footer>
</th:block>

=======
<!DOCTYPE html>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<footer th:fragment="content-footer">
<div class="footer">
<div class="copyright">
<img class="d-inline-block logo relative right-5" src="/static/images/logo/logo_full_dark.png">
<p class="pdd-left-5 mrg-top-minus-15px">Copyright © <b class="text-dark">우아한테크코스</b>. All rights reserved.</p>
</div>
<a href="https://woowabros.github.io/" target="_blank" class="btn btn-default btn-rounded bg-transparent">우아한형제들 기술블로그</a>
</div>
</footer>
</html>
>>>>>>> upstream/school0bhy


8 changes: 2 additions & 6 deletions src/main/resources/templates/includes/js.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<!DOCTYPE html>
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body th:fragment="common_js">

<th:block th:fragment="common_js">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
Expand All @@ -13,5 +10,4 @@
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js"></script>
<script src="/static/js/index.js"></script>
</body>
</html>
</th:block>
7 changes: 2 additions & 5 deletions src/main/resources/templates/includes/meta.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="common_meta">
<th:block th:fragment="common_meta">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
<title>우아한테크코스 기술블로그</title>
Expand All @@ -20,5 +18,4 @@
<meta name="twitter:description" id="metaTwitterDesc" content="우아한테크코스 크루 ooo의 개발 블로그">
<meta name="twitter:image" content="/static/images/logo/logo_thumnail_bg.jpg">
<meta name="twitter:domain" content="https://woowacourse.github.io/">
</head>
</html>
</th:block>
7 changes: 3 additions & 4 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<html xmlns:th="http://www.thymeleaf.org" lang="ko" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<link rel="stylesheet" href="/static/css/index.css">
</head>

Expand Down Expand Up @@ -86,7 +86,6 @@ <h2 th:text="${article.title}" class="mrg-btm-20 text-bold">
</div>

<th:block th:include="includes/footer :: footer"></th:block>
<!--<footer th:include="includes/footer :: footer"></footer>-->
<body th:include="includes/js :: common_js"></body>
<th:block th:include="includes/js :: common_js"></th:block>
</body>
</html>
11 changes: 4 additions & 7 deletions src/main/resources/templates/login.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
</head>
<body>
<div class="app">
Expand Down Expand Up @@ -71,10 +71,7 @@ <h2 class="text-center no-mrg-vertical mrg-btm-15 text-dark">로그인</h2>
</div>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js" integrity="sha384-pjaaA8dDz/5BgdFUPX6M/9SUZv4d12SUPF0axWc+VRZkx5xU3daN+lYb49+Ax+Tl" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js"></script>
<script src="/static/js/index.js"></script>
<th:block th:include="includes/js :: common_js"></th:block>

</body>
</html>
6 changes: 3 additions & 3 deletions src/main/resources/templates/mypage-edit.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<link rel="stylesheet" href="/static/css/index.css">
<link rel="stylesheet" href="/static/css/mypage.css">
</head>
Expand Down Expand Up @@ -105,6 +105,6 @@ <h4 class="card-title d-inline-block">profile</h4>
</div>
</div>
</div>
<body th:include="includes/js :: common_js"></body>
<th:block th:include="includes/js :: common_js"></th:block>
</body>
</html>
6 changes: 3 additions & 3 deletions src/main/resources/templates/mypage.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<link rel="stylesheet" href="/static/css/index.css">
<link rel="stylesheet" href="/static/css/mypage.css">
<style>
Expand Down Expand Up @@ -116,6 +116,6 @@ <h4 class="card-title d-inline-block">profile</h4>
</div>
</div>
</div>
<body th:include="includes/js :: common_js"></body>
<th:block th:include="includes/js :: common_js"></th:block>
</body>
</html>
7 changes: 3 additions & 4 deletions src/main/resources/templates/signup.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://thymeleaf.org" lang="ko">
<head>
<head th:include="includes/meta :: common_meta"></head>
<head th:include="includes/css :: common_css"></head>
<th:block th:include="includes/meta :: common_meta"></th:block>
<th:block th:include="includes/css :: common_css"></th:block>
<link rel="stylesheet" href="/static/css/index.css">
</head>

Expand Down Expand Up @@ -88,8 +88,7 @@ <h2 class="text-center text-dark no-mrg-vertical mrg-btm-15">
</div>
</div>
</div>

<body th:include="includes/js :: common_js"></body>
<th:block th:include="includes/js :: common_js"></th:block>
<script>

const isSamePasswordAndCheckPassword = () => document.getElementById('password').value === document.getElementById('input-pwcheck').value
Expand Down
Loading

0 comments on commit 2d79e10

Please sign in to comment.