<?php get_header(); ?>

<section class="site-wrapper is-layout-flow">


    <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>

            <div class="wp-block-group has-global-padding is-layout-constrained md:mt-60">
                <div class="alignwide">

                    <div class="wp-block-columns is-layout-flex is-stacked-on-tablet md:gap-60">
                        <div class="wp-block-column is-layout-flow">

                            <?php rt_get_template_part('single/category') ?>

                            <?php echo rt_get_breadrumbs() ?>

                            <h1 class="wp-block-post-title mt-20"><?php echo get_the_title() ?></h1>

                            <div class="wp-block-columns is-layout-flex gap-30 has-x-small-font-size has-meta-color has-link-meta-color">
                                <div class="wp-block-column is-layout-flex"><?php rt_get_template_part('single/meta') ?></div>
                                <div class="wp-block-column is-layout-flex md:justify-right">
                                    <?php if (rt_get_option('single_element_sharebox', true)): ?>
                                        <a class="js-modal" href="#global_share" role="button" aria-label="<?php echo __('Open share popup', 'jelajah-text')?>">
                                            <i class="rt-icon mr-10">
                                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-share" viewBox="0 0 16 16" aria-hidden="true">
                                                    <path d="M13.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3M11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.5 2.5 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5m-8.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m11 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3"></path>
                                                </svg>
                                            </i>
                                            <?php echo __('Share', 'jelajah-text') ?>
                                        </a>
                                    <?php endif ?>
                                </div>
                            </div>

                            <?php rt_get_template_part('single/thumbnail') ?>

                            <div class="wp-block-post-content">
                                <?php the_content() ?>
                                <?php wp_link_pages(); ?>
                            </div>

                            <div class="wp-block-columns is-layout-flex md:mt-60">
                                <div class="wp-block-column is-layout-flex"><?php rt_get_template_part('single/tag') ?></div>
                                <div class="wp-block-column is-layout-flex md:justify-right" style="max-width: 240px;"><?php rt_get_template_part('single/share') ?></div>
                            </div>

                            <?php rt_get_template_part('single/author') ?>

                            <?php rt_get_template_part('single/related') ?>

                            <?php if ((comments_open() || get_comments_number()) && rt_get_option('single_element_comment', true)) : ?>
                                <div class="wp-block-group md:mt-60 md:mb-60">
                                    <div class="wp-block-post-comments has-small-font-size is-layout-flow">
                                        <?php comments_template(); ?>
                                    </div>
                                </div>
                            <?php endif ?>

                        </div>
                        <div class="wp-block-column is-layout-flow" style="flex-basis:var(--wp--custom--sidebar--width)">
                            <?php get_sidebar() ?>
                        </div>
                    </div>

                </div>
            </div>


        <?php endwhile; ?>
    <?php endif ?>


</section>

<?php get_footer(); ?>