-
Notifications
You must be signed in to change notification settings - Fork 343
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
增加瀑布流形式的相册 #210
Comments
👋 Hello, 👋 您好, |
先把图片集处理成这个样子 <div class="tag-plugin gallery tile" id="tile-api">
<div class="tile-wrapper"><div class="tile-photo">
<img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG2" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error">
</div>
<div class="tile-photo">
<img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG22" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div>
<div class="tile-photo">
<img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG20" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error">
</div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG18" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG16" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG12" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG10" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG8" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG6" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div><div class="tile-photo"><img no-lazy="" src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg" alt="WechatIMG4" onerror="javascript:this.classList.add('error');this.src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg';" class="error"></div></div></div> |
https://blog.csdn.net/qq_32973061/article/details/82940975 I have read some posts and I think I need to learn how to use |
其实吧,我觉得网格布局就挺好的,看起来整齐:https://vlts.cc/v6/tag-plugins/#gallery |
网格也行,但是并不是每一张图片的长宽比都是一样的,这个怎么处理呢? |
就跟系统相册一样,超出部分剪裁,反正可以点击放大看全图的。 |
volantis也主要是大佬开发的,那感觉这个功能很好实现,移过来就好了。 但是能不能加一个属性,[directory:文件夹],能自动拉取文件夹中的照片。这里的文件夹可以是博客目录下的文件夹,或者是github仓库中的文件夹,也可以是自己云存储的文件夹 https://pinlyu.com/posts/31/ 还有一个横向的图片排版 https://www.jianshu.com/p/46a4ca3e6623# (function(){
var grid;
function init() {
grid = new Minigrid({
container: '.cards',
item: '.card',
gutter: 12
});
grid.mount();
}
// mount
function update() {
grid.mount();
}
document.addEventListener('DOMContentLoaded', init);
window.addEventListener('resize', update);
})(); http://jsbin.com/wamele/edit?js,output |
不错,可以参考下 |
目前我把相册做成这个样子了。 不过另外说一句,javascript真实太好玩了~简单易学,功能强大 |
刚刚看了一下又拍云的缩略图功能,我觉得可以加入这个功能。 |
大佬,你觉得这个还行吗?这个可以开pull request吗? |
https://blog.pengfeima.cn/gallery/ 具体效果可以看这里。 |
很多人不一定有又拍云 |
其他CDN的配置是类似的。如果不使用缩略图,留空就行了。 |
这个不用pr了😅有喜欢的小伙伴可以fork你的版本 |
好吧~ 我在看文档GitHub integrations的文档~ |
已经实现 |
👋 Hello, 👋 您好, |
希望能够有以下的效果:
https://meta.discourse.org/t/tiles-image-gallery/81950
可以和swpier功能并列,都需要使用fancybox。
The text was updated successfully, but these errors were encountered: