Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
🩹 恢复了 无图 样式
Browse files Browse the repository at this point in the history
  • Loading branch information
bakaomg committed Feb 29, 2020
1 parent c46da1f commit 179ad63
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 5 deletions.
43 changes: 40 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,42 @@
</div>

<?php while($this->next()): ?>
<?php
$PostType = $this->fields->PostType;
if ($PostType == 'nopic') { ?>
<div class="mdui-card mdui-hoverable moe-nopic-card">
<div class="moe-left-icon">
<i class="mdui-icon material-icons">&#xe0c9;</i>
</div>

<h2 class="moe-nopic-title">
<a href="<?php $this->permalink() ?>"><?php $this->sticky(); $this->title() ?></a>
</h2>

<div class="moe-nopic-excerpt">
<?php if (!$this->excerpt && !$this->fields->excerpt) {
echo $GLOBALS['CastleLang']['index']['excerptEmpty'];
} elseif ($this->fields->excerpt) {
echo Castle_Contents::parseOwO($this->fields->excerpt);
} else {
$this->excerpt(100);
} ?>
</div>

<div class="mdui-divider"></div>

<div class="moe-nopic-info">
<i class="mdui-icon material-icons moe-author-icon">account_circle</i>
<span><?php $this->author(); ?></span>
<i class="mdui-icon material-icons moe-time-icon">access_time</i>
<span><?php $this->date($GLOBALS['CastleLang']['index']['time']); ?></span>
<i class="mdui-icon material-icons">forum</i>
<span><?php echo sprintf($GLOBALS['CastleLang']['index']['comment'], $this->commentsNum); ?></span>
</div>
</div>

<?php }else{ ?>

<div class="mdui-card mdui-hoverable moe-default-card">
<div class="mdui-card-media">
<div class="moe-card-cover-image lazyload" data-src="<?php
Expand All @@ -37,7 +73,7 @@
?>" style="background-image:url('');"></div>
<div class="mdui-card-media-covered">
<div class="mdui-card-primary">
<a href="<?php $this->permalink() ?>" class="mdui-card-primary-title mdui-text-truncate"><?php $this->title() ?></a>
<a href="<?php $this->permalink() ?>" class="mdui-card-primary-title mdui-text-truncate"><?php $this->sticky(); $this->title() ?></a>
<div class="mdui-card-primary-subtitle"><?php echo sprintf($GLOBALS['CastleLang']['index']['view'], Castle_Contents::PostView($this)); ?> | <?php echo sprintf($GLOBALS['CastleLang']['index']['comment'], $this->commentsNum); ?></div>
</div>
</div>
Expand All @@ -62,10 +98,11 @@
<div class="mdui-card-header-title"><?php $this->author(); ?></div>
<div class="mdui-card-header-subtitle"><?php $this->date($GLOBALS['CastleLang']['index']['time']); ?></div>
<div class="mdui-card-menu">
<a href="<?php $this->permalink() ?>" class="mdui-btn mdui-text-color-theme"><?php echo $GLOBALS['CastleLang']['index']['viewLink']; ?></a>
</div>
<a href="<?php $this->permalink() ?>" class="mdui-btn mdui-text-color-theme"><?php echo $GLOBALS['CastleLang']['index']['viewLink']; ?></a>
</div>
</div>
</div>
<?php } ?>
<?php endwhile; ?>


Expand Down
41 changes: 39 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,42 @@
?>
<main id="moe-post-list">
<?php while($this->next()): ?>
<?php
$PostType = $this->fields->PostType;
if ($PostType == 'nopic') { ?>
<div class="mdui-card mdui-hoverable moe-nopic-card">
<div class="moe-left-icon">
<i class="mdui-icon material-icons">&#xe0c9;</i>
</div>

<h2 class="moe-nopic-title">
<a href="<?php $this->permalink() ?>"><?php $this->sticky(); $this->title() ?></a>
</h2>

<div class="moe-nopic-excerpt">
<?php if (!$this->excerpt && !$this->fields->excerpt) {
echo $GLOBALS['CastleLang']['index']['excerptEmpty'];
} elseif ($this->fields->excerpt) {
echo Castle_Contents::parseOwO($this->fields->excerpt);
} else {
$this->excerpt(100);
} ?>
</div>

<div class="mdui-divider"></div>

<div class="moe-nopic-info">
<i class="mdui-icon material-icons moe-author-icon">account_circle</i>
<span><?php $this->author(); ?></span>
<i class="mdui-icon material-icons moe-time-icon">access_time</i>
<span><?php $this->date($GLOBALS['CastleLang']['index']['time']); ?></span>
<i class="mdui-icon material-icons">forum</i>
<span><?php echo sprintf($GLOBALS['CastleLang']['index']['comment'], $this->commentsNum); ?></span>
</div>
</div>

<?php }else{ ?>

<div class="mdui-card mdui-hoverable moe-default-card">
<div class="mdui-card-media">
<div class="moe-card-cover-image lazyload" data-src="<?php
Expand Down Expand Up @@ -88,10 +124,11 @@
<div class="mdui-card-header-title"><?php $this->author(); ?></div>
<div class="mdui-card-header-subtitle"><?php $this->date($GLOBALS['CastleLang']['index']['time']); ?></div>
<div class="mdui-card-menu">
<a href="<?php $this->permalink() ?>" class="mdui-btn mdui-text-color-theme"><?php echo $GLOBALS['CastleLang']['index']['viewLink']; ?></a>
</div>
<a href="<?php $this->permalink() ?>" class="mdui-btn mdui-text-color-theme"><?php echo $GLOBALS['CastleLang']['index']['viewLink']; ?></a>
</div>
</div>
</div>
<?php } ?>
<?php endwhile; ?>


Expand Down

0 comments on commit 179ad63

Please sign in to comment.