This repository was archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
#64 feed front 추가 #72
Open
bearics
wants to merge
2
commits into
main
Choose a base branch
from
f/feed-front
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
front/src/main/kotlin/com/sns/front/controller/ArticleController.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package com.sns.front.controller | ||
|
|
||
| import org.springframework.stereotype.Controller | ||
| import org.springframework.ui.Model | ||
| import org.springframework.web.bind.annotation.GetMapping | ||
| import org.springframework.web.bind.annotation.PathVariable | ||
|
|
||
| /** | ||
| * User 관련된 페이지 모음 | ||
| * @author Hyounglin Jun | ||
| */ | ||
| @Controller | ||
| class ArticleController { | ||
| @GetMapping("/my-articles") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. front 쪽도 article, feed 용어 분리했습니다. |
||
| fun getFeeds(): String { | ||
| return "pages/feed/my-articles" | ||
| } | ||
|
|
||
| @GetMapping("/write-article") | ||
| fun writeFeed(): String { | ||
| return "pages/feed/write-article" | ||
| } | ||
|
|
||
| @GetMapping("/modify-articles/{articleId}") | ||
| fun modifyFeed( | ||
| @PathVariable articleId: Int, | ||
| model: Model, | ||
| ): String { | ||
| model.addAttribute("articleId", articleId) | ||
| return "pages/feed/modify-article" | ||
| } | ||
| } | ||
20 changes: 2 additions & 18 deletions
20
front/src/main/kotlin/com/sns/front/controller/FeedController.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,16 @@ | ||
| package com.sns.front.controller | ||
|
|
||
| import org.springframework.stereotype.Controller | ||
| import org.springframework.ui.Model | ||
| import org.springframework.web.bind.annotation.GetMapping | ||
| import org.springframework.web.bind.annotation.PathVariable | ||
|
|
||
| /** | ||
| * User 관련된 페이지 모음 | ||
| * @author Hyounglin Jun | ||
| */ | ||
| @Controller | ||
| class FeedController { | ||
| @GetMapping("/my-feeds") | ||
| @GetMapping("/feeds") | ||
| fun getFeeds(): String { | ||
| return "pages/feed/my-feeds" | ||
| } | ||
|
|
||
| @GetMapping("/write-feed") | ||
| fun writeFeed(): String { | ||
| return "pages/feed/write-feed" | ||
| } | ||
|
|
||
| @GetMapping("/modify-feed/{articleId}") | ||
| fun modifyFeed( | ||
| @PathVariable articleId: Int, | ||
| model: Model, | ||
| ): String { | ||
| model.addAttribute("articleId", articleId) | ||
| return "pages/feed/modify-feed" | ||
| return "pages/feed/feeds" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
front/src/main/resources/templates/fragments/feed/article.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <!DOCTYPE html> | ||
| <html xmlns:th="http://www.thymeleaf.org"> | ||
| <th:block th:fragment="articleFragment"> | ||
| <template id="article-template"> | ||
| <div class="card mb-4"> | ||
| <input type="text" class="article-id" value="%articleId%" style="display: none"> | ||
| <div class="card-image"> | ||
| <figure class="image is-4by3"> | ||
| <img src='%imageUrl%' alt="Placeholder image"> | ||
| </figure> | ||
| </div> | ||
| <div class="card-content"> | ||
| <div class="media"> | ||
| <div class="media-left"> | ||
| <figure class="image is-48x48"> | ||
| <img src="https://bulma.io/images/placeholders/96x96.png" alt="Placeholder image"> | ||
| </figure> | ||
| </div> | ||
| <div class="media-content"> | ||
| <p class="title is-4">%writerUserId%</p> | ||
| <p class="subtitle is-6">닉네임 자리</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="content"> | ||
| %body% | ||
| <br><br> | ||
| <time datetime="2016-1-1">%updatedAt%</time> | ||
| </div> | ||
| <footer class="card-footer"> | ||
| <a class="card-footer-item modify-feed-button">수정하기</a> | ||
| <a class="card-footer-item delete-feed-button">삭제하기</a> | ||
| </footer> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| </th:block> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mock response 추가라서 나중에 제거 할게요