-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Place blogroll and related-posts in separate sidebar-inner elements (#…
…593)
- Loading branch information
1 parent
705201b
commit afc7702
Showing
17 changed files
with
110 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
{%- if page.related_posts and page.related_posts.length > 0 %} | ||
<div class="popular-posts-header">{{ __('post.related_posts') }}</div> | ||
<div class="links-of-blogroll-title"> | ||
{%- if theme.related_posts.icon %}<i class="{{ theme.related_posts.icon }} fa-fw"></i>{% endif %} | ||
{{ __('post.related_posts') }} | ||
</div> | ||
<ul class="popular-posts"> | ||
{%- for path in page.related_posts %} | ||
{%- set popular_post = site.posts.findOne({ path: path }) %} | ||
<li class="popular-posts-item"> | ||
<a class="popular-posts-link" href="{{ url_for(popular_post.path) }}" rel="bookmark"> | ||
{%- if popular_post.date %} | ||
<div class="popular-posts-date">{{ date(popular_post.date) }}</div> | ||
{%- endif %} | ||
{%- if popular_post.img %} | ||
<div class="popular-posts-img"><img src="{{ popular_post.img }}" alt="{{ popular_post.title }}"></div> | ||
{%- endif %} | ||
<div class="popular-posts-title"><a href="{{ url_for(popular_post.path) }}" rel="bookmark">{{ popular_post.title }}</a></div> | ||
{%- if popular_post.excerpt and popular_post.excerpt != '' %} | ||
<div class="popular-posts-excerpt"><p>{{ popular_post.excerpt }}</p></div> | ||
<time class="popular-posts-time">{{ date(popular_post.date) }}</time> | ||
<br> | ||
{%- endif %} | ||
{{ popular_post.title }} | ||
</a> | ||
</li> | ||
{%- endfor %} | ||
</ul> | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
source/css/_common/components/third-party/related-posts.styl
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
if (hexo-config('related_posts.enable')) { | ||
.sidebar-post-related { | ||
font-size: $font-size-smaller; | ||
padding: $sidebar-padding 0 0 0; | ||
} | ||
|
||
.popular-posts { | ||
margin: 0; | ||
padding: 1em 0; | ||
text-align: left; | ||
|
||
.popular-posts-item { | ||
display: block; | ||
|
||
.popular-posts-link { | ||
border-bottom: 0; | ||
display: block; | ||
padding: 5px 20px; | ||
transition: background .2s ease-in-out; | ||
|
||
&:hover { | ||
background: var(--menu-item-bg-color); | ||
} | ||
} | ||
|
||
.popular-posts-time { | ||
color: $site-state-item-name-color; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters