【问题标题】:Add 360 photo to jekyll post or background添加 360 照片到 Jekyll 帖子或背景
【发布时间】:2023-01-03 20:08:03
【问题描述】:

我想在 jekyll 网页的帖子中添加 360 度全景照片。我已经知道有一些服务可以存储这些服务,然后使用 iframe 结构将照片添加到帖子中。

我想要的是将照片存储在服务器文件夹中(图片) 并使用panolens.js将照片添加为相框或背景

For example in this case they do this editing the index.html。我想要的是通过 jekyll post markdown 或其他方式获得它。例如这样的事情:

【问题讨论】:

    标签: javascript html jekyll photo


    【解决方案1】:

    我的解决方案是在帖子中定义一组流动的照片 URL;小心缩进数组元素并在 - 符号后放置一个空格

    ---
    layout: post
    title: Photos
    gallery:     
        - https://path/to/photos/photo1.jpg
        - https://path/to/photos/photo2.jpg
        - https://path/to/photos/photo3.jpg
    ---
    

    然后在 post.html 布局中,我只用我喜欢的样式显示它们,最小的就是这样,但当然,你可以使用你喜欢的画廊幻灯片:

    {% for image in page.gallery %}
        <img src="{{ image }}" />
    {% endfor %}
    

    【讨论】:

    • 这将以实际格式 (2:1) 显示照片,但我认为不是 3D 视图模式...
    • 不,您必须根据自己的目的调整代码
    猜你喜欢
    • 2014-07-21
    • 1970-01-01
    • 1970-01-01
    • 2020-02-06
    • 2013-05-09
    • 1970-01-01
    • 2020-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多