feat: レイアウト等を統一し、ヘッダーを追加

This commit is contained in:
usbharu 2024-09-06 17:41:27 +09:00
parent f86a224ed2
commit 4d86cc0e41
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
7 changed files with 51 additions and 27 deletions

View File

@ -11,7 +11,8 @@
<!--/*@thymesVar id="post" type="dev.usbharu.hideout.core.application.post.PostDetail"*/-->
<img alt="" height="80px" src="" th:src="${post.actor.icon}" width="80px">
<div style="display: inline-block">
<p th:text="${post.actor.screenName}+'('+${post.actor.name}+'@'+${post.actor.domain}+')'"></p>
<a th:href="${post.actor.url}"
th:text="${post.actor.screenName}+'(@'+${post.actor.name}+'@'+${post.actor.domain}+')'"></a>
</div>
<div th:utext="${post.content}">

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" th:replace="~{layout::layout(${ogp}, ~{::#content})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div th:replace="~{fragments-timeline :: simple-timline(${timeline},'/home')}"></div>
<div id="content" th:replace="~{fragments-timeline :: simple-timline(${timeline},'/home')}"></div>
</body>
</html>

View File

@ -2,11 +2,11 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head prefix="og: http://ogp.me/ns#">
<meta charset="UTF-8">
<title th:title="${ogp.title}">Index</title>
<meta property="og:url" th:content="${ogp.url}">
<meta property="og:title" th:content="${ogp.title}">
<meta property="og:description" th:content="${ogp.description}">
<th:block th:if="${ogp.image != null}">
<title th:title="${ogp?.title}">Index</title>
<meta property="og:url" th:content="${ogp?.url}">
<meta property="og:title" th:content="${ogp?.title}">
<meta property="og:description" th:content="${ogp?.description}">
<th:block th:if="${ogp?.image != null}">
<meta property="og:image" th:content="${ogp.image}">
</th:block>
<noscript>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en" th:fragment="layout(ogp, content)" xmlns:th="http://www.thymeleaf.org">
<head prefix="og: http://ogp.me/ns#">
<meta charset="UTF-8">
<!--/*@thymesVar id="ogp" type="dev.usbharu.hideout.core.interfaces.web.common.OGP"*/-->
<title th:title="${ogp?.title}">Index</title>
<meta property="og:url" th:content="${ogp?.url}">
<meta property="og:title" th:content="${ogp?.title}">
<meta property="og:description" th:content="${ogp?.description}">
<th:block th:if="${ogp?.image != null}">
<meta property="og:image" th:content="${ogp.image}">
</th:block>
</head>
<body>
<header>
<a href="/home">Hideout</a><a href="/publish">New Post</a><a href="/users/1"><img height="80px"
src="/users/i/icon.jpg" width="80px"></a>
</header>
<hr>
<main>
<div th:replace="${content}"></div>
</main>
<footer>
</footer>
</body>
</html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="ja" xmlns:th="http://www.thymeleaf.org">
<html lang="ja" th:replace="~{layout::layout(${ogp}, ~{::#content})}" xmlns:th="http://www.thymeleaf.org">
<head prefix="og: http://ogp.me/ns#">
<meta charset="UTF-8">
<title th:text="#{post-form.new-posts}">New Posts!</title>
@ -7,6 +7,7 @@
<meta property="og:title" th:content="#{post-form.new-posts}">
</head>
<body>
<div id="content">
<div>
<img alt="" height="80px" src="" th:src="${user.iconUrl}" width="80px">
@ -56,5 +57,6 @@
</div>
</form>
</div>
</body>
</html>

View File

@ -1,25 +1,14 @@
<!DOCTYPE html>
<html lang="ja" xmlns:th="http://www.thymeleaf.org">
<html lang="ja" th:replace="~{layout::layout(${ogp},~{::#content})}" xmlns:th="http://www.thymeleaf.org">
<head prefix="og: http://ogp.me/ns#">
<meta charset="UTF-8">
<title th:text="#{post-by-id.title(${post.actor.screenName},${instance.name})}">Posts - hideout</title>
<meta property="og:url" th:content="${post.url}">
<meta property="og:title" th:content="#{post-by-id.title(${post.actor.screenName},${instance.name})}">
<meta property="og:description" th:content="${post.text}">
<th:block
th:if="${post.mediaDetailList.isEmpty() || (post.mediaDetailList.get(0).thumbnailUrl == null && (post.mediaDetailList.get(0).type != 'Image' || post.mediaDetailList.get(0).type != 'Video'))}">
<meta property="og:image" th:content="${post.actor.icon}">
</th:block>
<th:block
th:unless="${post.mediaDetailList.isEmpty() || (post.mediaDetailList.get(0).thumbnailUrl == null && (post.mediaDetailList.get(0).type != 'Image' || post.mediaDetailList.get(0).type != 'Video'))}">
<meta property="og:image" th:content="${post.mediaDetailList.get(0).thumbnailUrl}">
</th:block>
<title>Posts - hideout</title>
</head>
<body>
<th:block th:if=" ${post.reply != null}">
<div id="content">
<th:block th:if=" ${post.reply != null}">
<th:block th:replace="~{fragments-post :: single-simple-post(${post.reply})}"></th:block>
<hr>
</th:block>
@ -40,5 +29,7 @@
<th:block th:replace="={fragments-post :: single-simple-post(${post.repost})}"></th:block>
<cite th:text="${post.repost.apId}"></cite>
</th:block>
</div>
</body>
</html>

View File

@ -1,10 +1,11 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en" th:replace="~{layout::layout(${ogp}, ~{::#content})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="#{user-by-id.title(${user.screenName},${instance.name})}">User - hideout</title>
<title>User - hideout</title>
</head>
<body>
<div id="content">
<div>
<img alt="" height="150px" th:src="${user.iconUrl}" width="150px">
<img alt="" height="150px" th:src="${user.bannerURL}" width="600px">
@ -17,7 +18,7 @@
<th:block th:if="!${user.locked}">
<h2 th:text="${user.screenName}"></h2>
</th:block>
<p th:text="${user.name} + '@' + ${user.host}"></p>
<p th:text="'@'+${user.name} + '@' + ${user.host}"></p>
</div>
<div>
<p th:text="${user.description}"></p>
@ -30,5 +31,7 @@
Followers</p>
</div>
<div th:replace="~{fragments-timeline :: simple-timline(${userTimeline},'/users/'+${user.name}+'@'+${user.host})}"></div>
</div>
</body>
</html>