Skip to content

Commit

Permalink
Merge pull request #212 from Kernel360/fix/front
Browse files Browse the repository at this point in the history
[#178] fix : 프론트 수정
  • Loading branch information
xorwns118 authored Aug 29, 2024
2 parents 40f42fb + 4bac69b commit 8974c10
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/main/resources/static/css/board-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
padding: 0;
margin: 0;
list-style: none;
}

.container {
margin-bottom: 100px;
}
2 changes: 1 addition & 1 deletion src/main/resources/static/css/script-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ strong {
background-color: #000000;
color: white;
border-radius: 5%;
width: 180px;
width: 200px;
height: 20px;
text-align: center;
line-height: 20px;
Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/static/js/reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,20 @@ async function deleteReply(replyId, userId, name, boardId){
window.location.reload();
}
).catch((e) => console.error(e))
}


function checkButton(){
const commentTextArea = document.getElementById('comment-text');
const submitButton = document.getElementById('submit_button');

// 입력값이 변경될 때마다 호출되는 함수
commentTextArea.addEventListener('input', () => {
// 텍스트 영역의 값이 비어 있으면 버튼 비활성화, 아니면 활성화
if (commentTextArea.value.trim() === '') {
submitButton.disabled = true;
} else {
submitButton.disabled = false;
}
});
}
6 changes: 3 additions & 3 deletions src/main/resources/templates/board-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<title>Board Detail</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/header-style.css">
<link rel="icon" href="/images/speechup.png">
</head>
<body>

Expand All @@ -22,8 +21,9 @@ <h1 class="my-4">Board Detail</h1>
<div class="card-body">
<h5 id="board-title" class="card-title" th:text="${board.title}">Sample Title</h5>
<p id="board-text" class="card-text" th:text="${board.getContent}">Sample Content</p>
<p class="card-text"><small class="text-muted" th:text="${board.createdAt}">2024-08-14</small></p>
<p class="card-text"><small class="text-muted" th:text="${board.modifiedAt}">2024-08-14</small></p>
<p class="card-text"><small class="text-muted" th:text="${#temporals.format(board.createdAt, 'yyyy년 MM월 dd일 HH:mm:ss')}">2024-08-14</small></p>
<p class="card-text"><small class="text-muted" th:text="${#temporals.format(board.modifiedAt, 'yyyy년 MM월 dd일 HH:mm:ss')}">2024-08-14</small></p>

</div>
</div>

Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/templates/board.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
</div>
</header>
<div class="container">
<h1 class="my-4">Board List</h1>
<h1 class="my-4">게시판 목록</h1>

<!-- 게시판 테이블 -->
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Content</th>
<!-- <th>Content</th>-->
<th>Created At</th>
<th>Modified At</th>
</tr>
Expand All @@ -36,9 +36,9 @@ <h1 class="my-4">Board List</h1>
<tr th:each="post : ${boardList}">
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.boardId}">1</a></td>
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.title}">Sample Title</a></td>
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.content}">Sample Content</a></td>
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.createdAt}">2024-08-14</a></td>
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.modifiedAt}">2024-08-14</a></td>
<!-- <td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${post.content}">Sample Content</a></td>-->
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${#temporals.format(post.createdAt,'yyyy년 MM월 dd일')}">2024-08-14</a></td>
<td><a th:href="@{/boards/{id}(id=${post.boardId})}" th:text="${#temporals.format(post.modifiedAt,'yyyy년 MM월 dd일')}">2024-08-14</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h2>대본</h2>
</ul>
</div>
<div class="file-upload">
<span class="help-icon">⚠️업로드 전에 확인해주세요!⚠️</span>
<span class="help-icon">⚠️업로드 전에 확인해주세요!⚠️ </span>
<h2>파일 업로드</h2>
<input type="file" id="file-input" />
<button id="upload-btn" >업로드</button>
Expand Down

0 comments on commit 8974c10

Please sign in to comment.