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

<section id="Articleview">
    <div class="grid_article">
        <header class="header_grid_article">
            <h3><?php echo $header ?></h3>
            <form method="get">
                <input type="number" name="ile" value="<?php echo $ile; ?>" placeholder="ilosc postów najnowszych">
                <input type="text" name="zawiera" placeholder="szukaj">
                <button type="submit">sprawdzam</button>
            </form>
        </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>

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