Add lately.js

This commit is contained in:
Skywt2003 2021-08-04 20:25:56 +08:00
parent e8f1d76cb7
commit 6accfaef67
4 changed files with 18 additions and 14 deletions

View File

@ -11,6 +11,7 @@
$("article pre").addClass("shadow rounded"); $("article pre").addClass("shadow rounded");
$("table").addClass("table"); $("table").addClass("table");
}); });
Lately({'target' : '.lately-a, .lately-b, .lately-c'});
</script> </script>
<footer class="mt-5 mb-5" id="footer" role="footer"> <footer class="mt-5 mb-5" id="footer" role="footer">
<div class="container"> <div class="container">

View File

@ -31,6 +31,9 @@
<script src="<?php $this->options->themeUrl('/assets/js/core/popper.min.js');?>"></script> <script src="<?php $this->options->themeUrl('/assets/js/core/popper.min.js');?>"></script>
<script src="<?php $this->options->themeUrl('/assets/js/core/bootstrap.min.js');?>"></script> <script src="<?php $this->options->themeUrl('/assets/js/core/bootstrap.min.js');?>"></script>
<!-- lately JS -->
<script src="https://tokinx.github.io/lately/lately.min.js"></script>
<!-- Argon Theme JS --> <!-- Argon Theme JS -->
<script src="<?php $this->options->themeUrl('/assets/js/argon-design-system.min.js');?>"></script> <script src="<?php $this->options->themeUrl('/assets/js/argon-design-system.min.js');?>"></script>

View File

@ -27,18 +27,14 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit;
<?php if ($this->fields->headPic !='') { ?> <?php if ($this->fields->headPic !='') { ?>
<img src=<?php $this->fields->headPic(); ?> class="img-fluid mx-auto d-block shadow rounded mb-3" alt="<?php $this->title(); ?>"> <img src=<?php $this->fields->headPic(); ?> class="img-fluid mx-auto d-block shadow rounded mb-3" alt="<?php $this->title(); ?>">
<?php } ?> <?php } ?>
<div>
<h1 class="font-weight-bold post-title" itemprop="name headline"> <h1 class="font-weight-bold post-title" itemprop="name headline">
<a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a> <a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h1> </h1>
<!--<div class="post-meta" role="meta">--> <!-- <p class="text-gray">
<!-- <span class="nav-item"><i class="czs-calendar"></i><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></span>--> <time class="lately-a" datetime="<?php $this->date('c'); ?>" itemprop="datePublished" pubdate>Lately</time>
<!-- <?php if (count($this->tags) > 0) { ?>--> </p> -->
<!-- <span class="nav-item"><i class="czs-tag"></i><?php $this->tags(",",true,'aa'); ?></span>--> </div>
<!-- <?php } ?>-->
<!-- <?php if ($this->commentsNum > 0) {?>-->
<!-- <span class="nav-item"><i class="czs-comment"></i><a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('0 评', '1 评', '%d 评');?></a></span>-->
<!-- <?php } ?>-->
<!-- </div>-->
<div class="summary post-content" itemprop="articleBody"> <div class="summary post-content" itemprop="articleBody">
<?php $this->content('More...'); ?> <?php $this->content('More...'); ?>
</div> </div>

View File

@ -5,7 +5,11 @@
<article itemscope itemtype="http://schema.org/BlogPosting"> <article itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="font-weight-bold post-title" itemprop="name headline"><?php $this->title() ?></h1> <h1 class="font-weight-bold post-title" itemprop="name headline"><?php $this->title() ?></h1>
<div> <div>
<i class="far fa-calendar-alt"></i> <time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date('Y-m-d D h:i a'); ?></time> <span class="text-gray">
<i class="far fa-calendar-alt"></i>
<time class="lately-a" datetime="<?php $this->date('c'); ?>" itemprop="datePublished" pubdate>Lately</time> |
<time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date('Y-m-d D h:iA'); ?></time>
</span>
<?php if ($this->user->hasLogin()): ?> <?php if ($this->user->hasLogin()): ?>
<a class="badge badge-primary" href="<?php $this->options->siteUrl();?>admin/write-post.php?cid=<?php $this->cid();?>"> <a class="badge badge-primary" href="<?php $this->options->siteUrl();?>admin/write-post.php?cid=<?php $this->cid();?>">
<i class="far fa-edit"></i> <i class="far fa-edit"></i>