%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/wp-content/themes/cwg/
Upload File :
Create Path :
Current File : //var/www/cwg/wp-content/themes/cwg/dna-workshop.php

<?php

/**
 * The main template file
 * Template Name: DNA Workshop
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package onepoint
 */

global $post;

get_header();

?>

<!----Should be placed when there is no carousel-->
<div class="js-headerGap h-[51px]"></div>

<div class="px-5 mt-[32px]">
    <div class="flex items-center gap-[10px] text-[12px]">
        <a href="http://cwg.local" class="text-grey-textLight">Home</a>
        <span> &gt; </span>  
        <a href="<?= get_permalink(265084); ?>" class="text-grey-textLight">DNA</a>
        <span> &gt; </span>  
        <a href="<?= get_permalink(198653); ?>" class="font-light overflow-hidden whitespace-nowrap overflow-ellipsis leading-[16px]">The Workshop</a>  
    </div>
</div>
<?php
if(have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
        <section class="relative w-full px-[20px] py-[30px] lg:px-[195px] lg:pb-[40px]">
            <div class="flex flex-row mb-[15px] items-baseline justify-between">
                <div class="text-base leading-6 font-medium uppercase"><?php the_field('title'); ?></div>
                <div class="js-share-button hidden lg:flex justify-between items-center text-[12px] w-[58px] h-[15px] leading-5 text-grey-dark uppercase cursor-pointer">
                    <span><?php include(locate_template('/assets/img/share-black.svg')); ?></span>
                    SHARE
                </div>
            </div>
            <div class="text-sm font-light mb-[10px] lg:mb-[30px]"><?php the_field('description'); ?></div>
            <div class="js-share-button flex lg:hidden justify-between items-center text-[12px] w-[58px] h-[15px] leading-5 text-grey-dark uppercase ml-auto mb-[40px] cursor-pointer">
                    <span><?php include(locate_template('/assets/img/share-black.svg')); ?></span>
                    SHARE
                </div>
            <?php
                if (have_rows('gallery')) {
                    while (have_rows('gallery')) {
                        the_row();
                        ?>
                            <div class="relative w-full mb-[20px]">
                                <?php
                                if(count(get_sub_field('line'))>0) {
                                    ?>
                                    <div class="flex flex-row mb-[20px] gap-x-[8px] gap-y-[30px] lg:gap-x-[50px] lg:gap-y-[24px]">
                                        <?php
                                        foreach(get_sub_field('line') as $gal) {
                                            $row_media = $gal['media'][0];
                                            $description = $gal['label'];
                                            ?>
                                            <div class="flex flex-col w-auto h-full" style="<?= "flex:". (count(get_sub_field('line'))>1?$row_media['width']/$row_media['height']:"1") ?>">
                                                <?php
                                                if($row_media['type'] == "video") {
                                                    ?>
                                                    <video width="<?= $row_media['width'] ?>" height="<?= $row_media['height'] ?>" controls>
                                                        <source src="<?= isset($row_media['url']) ? $row_media['url'] : '' ; ?>" type="<?= isset($row_media['mime_type']) ? $row_media['mime_type'] : '' ; ?>">
                                                    </video>
                                                    <?php
                                                }
                                                else {
                                                    echo wp_get_attachment_image($row_media['id'], 'full', false, array('class' => 'w-auto h-full object-cover'));
                                                }
                                                ?>
                                                <div class="mt-[10px] lg:mt-[15px] text-xs font-light text-[#999999]"><?php echo $description; ?></div>
                                            </div>
                                            <?php
                                        }
                                        ?>
                                    </div>
                                    <?php
                                }
                                ?>
                            </div>
                        <?php
                    }
                }
            ?>
        </section>
        <?php
    }
}
?>

<?php 

get_footer(); 

?>

Zerion Mini Shell 1.0