<!--
  ~ Copyright (C) 2024 usbharu
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE html>
<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>Posts - hideout</title>

</head>
<body>

<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>
    <main>
        <p th:if="${post.pureRepost}" th:text="#{post.repost-by(${post.actor.name})}">Repost by user</p>
        <th:block th:unless="${post.pureRepost}">
            <th:block th:replace="~{fragments-post :: single-simple-post(${post})}"></th:block>
            <th:block th:replace="~{fragments-post :: single-post-controller(${post})}"></th:block>
        </th:block>
        <th:block th:if="${post.pureRepost}">
            <th:block th:replace="~{fragments-post :: single-simple-post(${post.repost})}"></th:block>
            <th:block th:replace="~{fragments-post :: single-post-controller(${post.repost})}"></th:block>
        </th:block>

    </main>
    <th:block th:if="${post.repost != null && !post.pureRepost}">
        <hr>
        <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>