<?php include("../elemetns_web/header.php") ?>
<?php include("../../assets/script/other/script.php") ?>

<section id="Hero">
    <div class="hero_main">
        <article class="left">
            <h1>Dołącz do społecznosci i publikuj posty bez ogranieczeń</h1>
            <a href="../login/signup.php" class="submit">Dołącz</a>
        </article>
        <article class="right">
            <h2>NAJNOWSZY POST</h2>

            <div class="block">
                <article class="article_block">
                    <?php if ($post_list[0]['img'] != "") { ?>
                        <img src="../../assets/img<?php echo $post_list[0]['img'] ?>" alt="" class="img_miniature">
                    <?php } ?>
                    <div class="article_block_intro">
                        <p class="article_block_autor">autor : <?php echo $post["autor"] ?></p>
                        <h2 class="article_block_intro_title">
                            <?php echo $post_list[0]['title'] ?>
                        </h2>
                        <p class="article_block_intro_content"><?php echo $post_list[0]['intro_max'] ?></p>
                    </div>
                </article>
                <div class="button_nav">
                    <button class="button_article"><a href="../other/post.php?numer=<?php echo $post_list[0]["id"] ?>">dalej</a></button>
                </div>
            </div>

        </article>
    </div>
    <div class="hero_link">
        <a href="#Articleview">przejdz do artykułów</a>
    </div>
</section>

<section id="Help">
    <div class="container">
        <h2>Blog nie mógłby istnieć bez waszego wsparcia dziekuje za wszelkie daroawizny i zachecam do wsparcia nawet symboliczną złotówką</h2>
        <button><a class="green">Wesprzyj</a></button>
    </div>
</section>

<section id="Why">
    <header class="why_header">
        <h2>Dlaczego nasz blog a nie inne</h2>
    </header>
    <div class="why_main">
        <article class="why_main_block">
            <i class="bi bi-stopwatch"></i>
            <h3>Czas</h3>
            <p>posty są publikowanę niemal odrazu</p>
        </article>
        <article class="why_main_block">
            <i class="bi bi-pencil-square"></i>
            <h3>Interfejs</h3>
            <p>Prosty i przejrzysty interfejs </p>
        </article>
        <article class="why_main_block">
            <i class="bi bi-person-circle"></i>
            <h3>Niezależność</h3>
            <p>Blog jest Niezależny od firm i marek </p>
        </article>
    </div>
</section>

<section id="Articleview">
    <div class="grid_article">
        <header class="header_grid_article">
            <h3><?php echo $header ?></h3>
        </header>

        <?php foreach ($post_list as $post) { ?>
            <div class="block">
                <article class="article_block">
                    <?php if ($post['img'] != "") { ?>
                        <img src="../../assets/img<?php echo $post['img'] ?>" alt="" class="img_miniature">
                    <?php } ?>
                    <div class="article_block_intro">
                        <p class="article_block_autor">autor : <?php echo $post["autor"] ?></p>
                        <h2 class="article_block_intro_title"><?php echo $post['title'] ?></h2>
                        <p class="article_block_intro_content"><?php echo $post['intro_min'] ?></p>
                    </div>
                </article>
                <div class="button_nav">
                    <button class="button_article"><a href="../other/post.php?numer=<?php echo $post["id"] ?>">dalej</a></button>
                </div>
            </div>
        <?php } ?>

        <div class="article_aside">
            <?php include("../elemetns_web/aside.php") ?>
        </div>
    </div>


</section>

<section id="Contact">
      <?php include("../../assets/script/other/senkontakt.php")?>
    <div class="center_form">
        <form method="post" class="form_grid" action="#Contact">
            <p id="mesage"> </p>
            <progress id="progres" max="100" value="0"></progress>

            <input class="progres_check one_two" type="text" name="name" placeholder="Imie">

            <input class="progres_check one_two" type="text" name="surname" placeholder="Nazwisko">

            <input class="progres_check" type="email" name="email" placeholder="email">

            <textarea class="textarea_form progres_check" name="mesage" placeholder="Wiadomsc"></textarea>

            <button type="submit" name="contact" class="submit_button no_send">wyślij</button>

        </form>
    </div>

    <script src="../../assets/js/validation.js"></script>
</section>

<?php include('../elemetns_web/footer.php') ?>