Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sidebar_footer_image): add sidebar footer image config #160

Merged
merged 4 commits into from
Jan 22, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ img:
daily_pic: "/img/daily_pic.png"
sidebar_header: "/img/sidebar_header.png"
footerico: "/img/footer/footer_ico-"
#upyun_logo: "/img/upyun_logo.png"
random_thumbnail: "/img/random/material-"
footer_image:
#upyun_logo:
#link: "https://www.upyun.com/"
#src: "/img/upyun_logo.png"

# Custom Fonts
fonts: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif
Expand Down
9 changes: 9 additions & 0 deletions layout/_partial/sidebar-footer_image.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% if(theme.img.footer_image) { %>
<div id="footer-image">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I suggest you to put the div inside the for loop
  • Please change #scheme-Paradox #upyun-logo by #scheme-Paradox #footer-image in style.css
  • Please test with multiple images to adapt the style

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm...
In one div block it's horizontal so multiple pictures show well.
In multiple div block it's vertical and only show one picture. The next one have to be scroll to show.
I will try to fix it although I have no idea what is leading to such a strange behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe try to change the div for a span and put them inside the loop

<% for (var i in theme.img.footer_image) { %>
<a href="<%= theme.img.footer_image[i].link %>" target="_blank" title="<%= i %>">
<img src="<%= theme.img.footer_image[i].src %>" alt="<%= i %>">
</a>
<% } %>
</div>
<% } %>
7 changes: 0 additions & 7 deletions layout/_partial/sidebar-sponsor.ejs

This file was deleted.

2 changes: 1 addition & 1 deletion layout/_partial/sidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
</div>

<!-- Sidebar Sponsor -->
<%- partial('_partial/sidebar-sponsor') %>
<%- partial('_partial/sidebar-footer_image') %>
</aside>