Skip to content

Commit

Permalink
feat: new page cover
Browse files Browse the repository at this point in the history
  • Loading branch information
lh1me committed Jun 1, 2021
1 parent 445a0ad commit 23e143e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1619416789282
version: 1622521899375
language: cn
aomori_widgets:
- toc
Expand Down
23 changes: 10 additions & 13 deletions layout/_partial/archive.ejs
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
<% if (pagination == 2){ %>
<% } else { %>
<% var last; %>
<% page.posts.each(function(post, i){ %>
<section class="archives-cover"></section>
<% var last; %>
<% page.posts.each(function(post, i){ %>
<% var year = post.date.year(); %>
<% if (last != year){ %>
<% if (last != null){ %>
<% if (last != null){ %>
</div></section>
<% } %>
<% last = year; %>
<section class="archives-wrap">
<% } %>
<% last = year; %>
<section class="archives-wrap">
<div class="archive-year-wrap">
<a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
<a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
</div>
<div class="archives">
<% } %>
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
<% }) %>
<% if (page.posts.length){ %>
<% }) %>
<% if (page.posts.length){ %>
</div></section>
<% } %>
<% } %>

<% if (page.total > 1){ %>
Expand Down
2 changes: 2 additions & 0 deletions layout/_partial/page/friends.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="friends-cover"></div>

<div class="friends-links clearfix">
<% for (var link in site.data.friends) { %>
<a href="<%= site.data.friends[link].url %>" rel="nofollow" target="_blank"> <%= site.data.friends[link].name %> </a>
Expand Down
4 changes: 2 additions & 2 deletions source/dist/build.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions source/images/archives.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed source/images/avatar.jpg
Binary file not shown.
1 change: 1 addition & 0 deletions source/images/friends.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions source/stylesheets/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
// .article-entry {}
}

&-cover {
width: 100%;
height: 260px;
margin-bottom: 50px;
background: url('/images/friends.svg') no-repeat center center;
background-size: contain;
}

&-links {
a {
background: var(--color-white-light);
Expand Down
9 changes: 9 additions & 0 deletions source/stylesheets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,15 @@ img:not([src]):not([srcset]) {
}
}

.archives-cover {
width: 100%;
height: 260px;
margin-bottom: 50px;
background: url('/images/archives.svg') no-repeat center center;
background-size: contain;
}


.archives-wrap {
background: var(--color-white-light);
border-radius: 8px;
Expand Down

0 comments on commit 23e143e

Please sign in to comment.