<?php
    
    if (!defined('ABSPATH')) exit; // Exit if accessed directly
    
    $prg_page_url = sprintf('?page=%s', 'portfolio-responsive-gallery');
    $add_new_url = sprintf('?page=%s&action=%s', 'portfolio-responsive-gallery', 'add');
?>

<div class="wrap">
    <div class="ays-portfolio-heart-beat-main-heading ays-portfolio-heart-beat-main-heading-container">        
        <h1 class="ays-portfolio-responsive-prg-wrapper ays_heart_beat">
            <?php echo esc_html( get_admin_page_title() ); ?> <i class="fa fa_heart_o animated"></i>
        </h1>
    </div>
    <div class="ays-prg-prg-main">
        <h2>
            <?php                 

                echo sprintf(
                    /* translators: 1: opening strong tag, 2: closing strong tag */
                    __( 'How to create a simple portfolio in 3 steps with the help of the %1$sPortfolio Responsive Gallery%2$s plugin.', 'portfolio-responsive-gallery' ),
                    '<strong>',
                    '</strong>'
                );
            ?>
        </h2>
        <fieldset>
            <div class="ays-prg-ol-container">
                <ol>
                    <li>
                        <?php 
                           
                            echo sprintf(
                                /* translators: 1: opening link tag, 2: closing link tag, 3: opening link tag, 4: closing link tag */
                                __( 'Go to the %1$sPortfolios%2$s page and build your first Portfolio Responsive Gallery by clicking on the %3$sAdd New%4$s button.', 'portfolio-responsive-gallery' ),
                                '<a href="' . esc_url( $prg_page_url ) . '" target="_blank">',
                                '</a>',
                                '<a href="' . esc_url( $add_new_url ) . '" target="_blank">',
                                '</a>'
                            );
                        ?>
                    </li>
                    <li>
                        <?php echo esc_html__( "Fill out the information by adding a title, projects and so on.", 'portfolio-responsive-gallery' ); ?>
                    </li>
                    <li>
                        <?php                            

                            echo sprintf(
                                /* translators: 1: opening strong tag, 2: closing strong tag */
                                __( 'Copy the %1$sshortcode%2$s of the Portfolio Responsive Gallery and paste it into any post.', 'portfolio-responsive-gallery' ),
                                '<strong>',
                                '</strong>'
                            );
                        ?> 
                    </li>
                </ol>
            </div>
            <div class="ays-prg-p-container">
                <p><?php echo esc_html__("Congrats! You have already created your first Portfolio Responsive Gallery." , 'portfolio-responsive-gallery'); ?></p>
            </div>
        </fieldset>
    </div>  
    <br>

    <div class="ays-prg-community-wrap">
        <div class="ays-prg-community-title">
            <h4><?php echo esc_html__( "Community", 'portfolio-responsive-gallery' ); ?></h4>
        </div>
        <div class="ays-prg-community-container">
            <div class="ays-prg-community-item">
                <a href="https://www.youtube.com/channel/UC-1vioc90xaKjE7stq30wmA" target="_blank" class="ays-prg-community-item-cover" style="color: #ff0000;background-color: rgba(253, 38, 38, 0.1);">
                    <img class="ays-prg-community-item-img" src="<?php echo esc_url( AYS_PRG_ADMIN_URL .'/images/youtube.png' ); ?>">
                </a>
                <h3 class="ays-prg-community-item-title"><?php echo esc_html__( "YouTube community", 'portfolio-responsive-gallery' ); ?></h3>
                <p class="ays-prg-community-item-desc"></p>
                <div class="ays-prg-community-item-footer">
                    <a href="https://www.youtube.com/channel/UC-1vioc90xaKjE7stq30wmA" target="_blank" class="button"><?php echo esc_html__( "Subscribe", 'portfolio-responsive-gallery' ); ?></a>
                </div>
            </div>
            <div class="ays-prg-community-item">
                <a href="https://wordpress.org/support/plugin/portfolio-responsive-gallery/" target="_blank" class="ays-prg-community-item-cover" style="color: #0073aa;background-color: rgb(220, 220, 220);">
                    <img class="ays-prg-community-item-img" src="<?php echo esc_url( AYS_PRG_ADMIN_URL .'/images/wordpress.png' ); ?>">
                </a>
                <h3 class="ays-prg-community-item-title"><?php echo esc_html__( "Free support", 'portfolio-responsive-gallery' ); ?></h3>
                <p class="ays-prg-community-item-desc"></p>
                <div class="ays-prg-community-item-footer">
                    <a href="https://wordpress.org/support/plugin/portfolio-responsive-gallery/" target="_blank" class="button"><?php echo esc_html__( "Join", 'portfolio-responsive-gallery' ); ?></a>
                </div>
            </div>
            <div class="ays-prg-community-item">
                <a href="https://ays-pro.com/contact" target="_blank" class="ays-prg-community-item-cover" style="color: #ff0000;background-color: rgba(0, 115, 170, 0.22);">
                    <img class="ays-prg-community-item-img" src="<?php echo esc_url( AYS_PRG_ADMIN_URL .'/images/logo_final.png' ); ?>">
                </a>
                <h3 class="ays-prg-community-item-title"><?php echo esc_html__( "Premium support", 'portfolio-responsive-gallery' ); ?></h3>
                <p class="ays-prg-community-item-desc"></p>
                <div class="ays-prg-community-item-footer">
                    <a href="https://ays-pro.com/contact" target="_blank" class="button"><?php echo esc_html__( "Contact", 'portfolio-responsive-gallery' ); ?></a>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var acc = document.getElementsByClassName("ays-prg-asked-question__header");
    var i;
    for (i = 0; i < acc.length; i++) {
      acc[i].addEventListener("click", function() {
        
        var panel = this.nextElementSibling;
        
        
        if (panel.style.maxHeight) {
          panel.style.maxHeight = null;
          this.children[1].children[0].style.transform="rotate(0deg)";
        } else {
          panel.style.maxHeight = panel.scrollHeight + "px";
          this.children[1].children[0].style.transform="rotate(180deg)";
        } 
      });
    }
</script>
