Skip to content

Commit

Permalink
feat: new friends page
Browse files Browse the repository at this point in the history
  • Loading branch information
lh1me committed Jan 16, 2022
1 parent 6a0f8d4 commit f76711d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 35 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1641793753600
version: 1642325296972
language: cn
aomori_widgets:
- toc
Expand Down
19 changes: 12 additions & 7 deletions layout/_partial/page/friends.ejs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<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>
<% } %>
</div>
<% site.data.friends.forEach((items) => { %>
<div class="friends-category">
<div class="friends-category-title">
<%= items.category %>
</div>
<div class="friends-category-inner clearfix">
<% items.data.forEach((item) => { %>
<a href="<%= item.url %>" rel="nofollow" target="_blank"> <%= item.name %> </a>
<% }) %>
</div>
</div>
<% }) %>

<% if (post.content){ %>
<article
Expand Down
2 changes: 1 addition & 1 deletion source/dist/custom.css

Large diffs are not rendered by default.

48 changes: 31 additions & 17 deletions source/stylesheets/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,38 @@
// .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);
border-radius: 8px;
display: block;
float: left;
margin-bottom: 20px;
margin-right: 20px;
padding: 15px 20px;
&-category {
&-title {
position: relative;
line-height: 1;
padding: 0 0 20px 12px;
font-size: 18px;
font-weight: bold;

&::before {
background: var(--color-main);
content: '';
height: 18px;
left: 0;
position: absolute;
top: 0;
width: 3px;
}
}

&-inner {
padding: 0 0 10px;

a {
float: left;
background: var(--color-white-light);
border-radius: 8px;
display: block;
margin-bottom: 20px;
margin-right: 20px;
padding: 15px 20px;
position: relative;
}
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions source/stylesheets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -938,15 +938,6 @@ 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 f76711d

Please sign in to comment.