<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php $this->widget('Widget_Metas_Category_List')->to($categorys);?>
<?php while ($categorys->next()): ?> <?php if ($this->category ==
$categorys->slug):?>
<?php $slug = $categorys->slug; ?>
<?php $slug_name = $categorys->title; ?>
<?php endif; ?>
<?php endwhile; ?>

<?php $this->widget('Widget_Archive@index', 'pageSize=999&type=category', 'mid='.General::getCategoryId($slug))->to($cateArticle); ?>


<div class="uk-section uk-section-muted">
  <div class="uk-container">
    <div class="uk-background-default uk-border-rounded uk-box-shadow-small">
      <div class="uk-container uk-container-xsmall uk-padding-large">
          <aside id="aside"></aside>
     
        <article class="uk-article">
    <?php if(General::getCategoryNoneOtherPost(General::getCategoryId($slug),$this->cid) !== true):?>
            <button class="uk-button uk-button-primary" uk-toggle="target: #offcanvas-docs"  data-uk-toggle><span uk-icon="icon: chevron-double-left"></span> More Faqs</button>
            <?php endif;?>
            <button class="uk-button uk-button-primary uk-margin-small-right" type="button" uk-toggle="target: #menus" id="menuBtn" style="display:none;margin-top:15px"><span uk-icon="icon: menu"></span> Catalog navigation</button>

          <h1 class="uk-article-title uk-article-title-ove"><?php $this->title() ?></h1>
          
<!--           <div class="uk-article-meta uk-margin uk-flex uk-flex-middle">-->
<!--          <img class="uk-border-circle uk-avatar-small" src="--><?php //echo General::getAvatar($this->author->mail); ?><!--" alt="">-->
<!--          <div>-->
<!--             --><?php //$this->author->screenName();?><!-- Write<br>-->
<!--            <time class="uk-margin-small-right" datetime="--><?php //$this->date('Y-m-d H:i:s'); ?><!--">Post --><?php //$this->date('Y-m-d H:i:s'); ?><!--</time><br>-->
<!--              Last modified <time datetime="--><?php //echo date('Y-m-d H:i:s' , $this->modified); ?><!--">--><?php //echo date('Y-m-d H:i:s' , $this->modified); ?><!--</time>-->
<!--          </div>-->
<!--        </div>-->
        <div class="uk-article-content">
          <?php echo Parse::ParseContent($this->content); ?>
 

          </div>
          <div class="uk-margin-large-top paginate-post">
            <div class="uk-child-width-expand@s uk-grid-large" data-uk-grid>
              <div>
                <h5>Previous </h5>
                <div><?php $this->thePrev('%s', 'Not ', array('tagClass' => 'uk-remove-underline hvr-back'));?></div>
              </div>
              <div class="uk-text-right">
                <h5>Next </h5>
                <div><?php $this->theNext('%s', 'Not ', array('tagClass' => 'uk-remove-underline hvr-back'));?></div>
              </div>
            </div>
            
            
              
          </div>
          

        </article>
        
<?php if(General::Options('showTags') == true):?>
                      <?php echo General::getPostAllTags($this);?>
            <?php endif;?>
      </div>
    </div>
  </div>

</div>

<?php if(General::Options('hiddenComment') == '' || General::Options('hiddenComment') == false):?>
<div class="uk-section uk-section-muted">
  <div class="uk-container">
    <div class="uk-background-default uk-border-rounded uk-box-shadow-small">
<div class="uk-container uk-container-xsmall uk-padding-large">
            <?php $this->need('comments.php'); ?>
          
</div>
</div>
</div>
</div>
<?php endif;?>
<div id="menus" uk-offcanvas="overlay: true">
    <div class="uk-offcanvas-bar uk-flex uk-flex-column">
        <div style="font-size:20px;display: flex;
  justify-content: center;
  align-items: center;">Catalog navigation</div>
                 <hr class="uk-divider-icon">
<div class="menusx"></div>
       

    </div>
</div>
<div id="offcanvas-docs" data-uk-offcanvas="overlay: true">
  <div class="uk-offcanvas-bar">
    <button class="uk-offcanvas-close" type="button" data-uk-close></button>
    <div style="font-size:20px;display: flex;justify-content: center;align-items: center;">More Faqs</div>
                 <hr class="uk-divider-icon">
                 <ul class="uk-list" style="word-break:break-all">
        
        <?php while ($cateArticle->next()): ?>
        <?php if($cateArticle->cid !== $this->cid):?>
        <li class="text-ellipsis"><a href="<?php echo $cateArticle->permalink;?>"><?php echo $cateArticle->title;?></a></li>
        <?php endif; ?>
        <?php endwhile; ?>
     
    </ul>




  </div>
  

  
  
</div>

<script>
$(function(){
    if($('.uk-article-content').has('h1,h2,h3,h4,h5,h6').length){
        $("#menuBtn").fadeIn();
    }
    // //目录树
    // const defaults = Outline.DEFAULTS
    // let outline
    // defaults.title =  '',
    // defaults.selector = 'h1,h2,h3,h4,h5,h6',
    // defaults.position = 'sticky',
    // defaults.showCode = false,
    // defaults.parentElement = '.menusx',
    // defaults.articleElement = '.uk-article-content',
    // defaults.showNavModalFirst= false,
    // defaults.reader = {
    //     title:document.getElementsByClassName("uk-article-title")[0],
    //     target:'.uk-article-content',
    //     allowSpeak:true
    //     },
    // outline = new Outline(Outline.DEFAULTS)
const handler = function(attrs) {
  this.attr()
  $('img.lazyload')
  .visibility({
    type       : 'image',
    transition : 'fade in',
    duration   : 1000,
  });
 Fancybox.bind('[data-fancybox]', {
      groupAttr:false,
      Toolbar: {
    display: {
      left: ["infobar"],
      middle: [
        "zoomIn",
        "zoomOut",
        "toggle1to1",
        "rotateCCW",
        "rotateCW",
        "flipX",
        "flipY",
      ],
      right: ["slideshow", "thumbs", "close"],
    },
  },
  
  
});


}

 // outline.$on("enterReading", handler)
});
</script>


<?php $this->need('footer.php'); ?>