<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="Created" content="2026-03-02">
    <meta name="Author" content="Kārlis Grīnvalds">
    <meta name="Last edited" content="2026-05-14">
    <meta name="Edited by" content="Kārlis Grīnvalds">
    <meta name="csrf-token" content="<?= csrf_hash() ?>">
    <meta name="csrf-name" content="<?= csrf_token() ?>">
    <title>Topic form | Media CMS</title>
    <script src="js/jquery/jquery-3.7.1.min.js"></script>
    <script src="js/topic_form.js"></script>
    <script src="js/script.js"></script>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/user_forms.css">
    <link rel="stylesheet" href="css/elements.css">
</head>
<body>
    <?php echo $BodyParts ?>
    <!-- Shows create account and log in links or log out link and welcome message for the user -->
    <div id="UserProfile" class="user-profile"></div>
    <!-- Page layout -->
    <div class="container">
        <header>
            <!-- Displays all the action that the user can do -->
            <div id="GoBackBar" class="action-bar"></div>
        </header>
        <div class="main">
            <!-- Create topic form -->
            <h1>Topic form</h1><hr>
            <label for="TitleInputField">Topic title</label><br>
            <input type="text" id="TitleInputField">
            <button id="EnterBtn">Enter</button><br><br>
            <details open>
                <!-- Information for the user -->
                <summary>Information:</summary>
                <ul>
                    <li>The title can be changed any time.</li>
                    <li>Path name will be randomly generated and given.</li>
                    <li>Note that there can be many topics about the same thing.</li>
                </ul>
            </details>
            <!-- Error output -->
            <p id="ErrorText" class="error-text"></p>
        </div>
        <footer>Page: topic form</footer>
    </div>
</body>
</html>