<!--
  ~ 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 th:text="#{post-form.new-posts}">New Posts!</title>
    <meta property="og:url" th:content="${instance.url + '/publish'}">
    <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">
        <div style="display: inline-block">
            <p th:text="${user.screenName}+'('+${user.name}+'@'+${user.domain}+')'"></p>
        </div>
    </div>
    <form action="/publish" method="post" th:action="@{/publish}" th:object="${form}">
        <div>
            <label for="status-form-replyto" th:text="#{post-form.new-posts-replyTo}">Reply to</label>
            <input id="status-form-replyto" name="reply_to" th:value="${form.reply_to}" type="number">
        </div>
        <div>
            <label for="status-form-repost" th:text="#{post-form.new-posts.repost}">Repost</label>
            <input id="status-form-repost" name="repost" th:value="${form.repost}" type="number">
        </div>
        <div>
            <label for="stats-form-overview" th:text="#{post-form.new-posts-cw}"
                   th:title="#{post-form.new-posts-cw-title}"
                   title="Add content warning">CW</label>
            <input id="stats-form-overview" name="overview" type="text">
        </div>
        <div>
            <label for="status-form" th:text="#{post-form.new-posts-form-label}">What's on your mind?</label>
            <br>
            <textarea cols="33" id="status-form" name="status" rows="5"></textarea>
        </div>
        <div>
            <fieldset>
                <legend th:text="#{common.visibility}">Visibility</legend>
                <label for="status-form-visibility-public" th:text="#{common.visibility-public}">Public</label>
                <input id="status-form-visibility-public" name="visibility" th:checked="${form.visibility == 'PUBLIC'}"
                       type="radio"
                       value="PUBLIC">
                <label for="status-form-visibility-unlisted" th:text="#{common.visibility-unlisted}">Unlisted</label>
                <input id="status-form-visibility-unlisted" name="visibility"
                       th:checked="${form.visibility == 'UNLISTED'}" type="radio"
                       value="UNLISTED">
                <label for="status-form-visibility-followers" th:text="#{common.visibility-followers}">Followers</label>
                <input id="status-form-visibility-followers" name="visibility"
                       th:checked="${form.visibility == 'FOLLOWERS'}" type="radio"
                       value="FOLLOWERS">
            </fieldset>
        </div>
        <div>
            <input th:value="#{post-form.new-posts-submit}" type="submit" value="Publish!">
        </div>
    </form>

</div>
</body>
</html>