Code Monkey home page Code Monkey logo

Comments (6)

zhaoo avatar zhaoo commented on June 22, 2024

galleries.json 方便贴上来看看吧

from hexo-theme-zhaoo.

HandwerSTD avatar HandwerSTD commented on June 22, 2024

image
就长这样

from hexo-theme-zhaoo.

HandwerSTD avatar HandwerSTD commented on June 22, 2024

找到问题了,random-image.js 随机数好像写错了

var count = images.length;
res = images[Math.floor(Math.random() * (count + 1))];

应该为

var count = images.length;
res = images[Math.floor(Math.random() * (count))];

我记得这玩意不是下标从 0 开始到 count - 1 的吗……

from hexo-theme-zhaoo.

zhaoo avatar zhaoo commented on June 22, 2024

找到问题了,random-image.js 随机数好像写错了

var count = images.length;
res = images[Math.floor(Math.random() * (count + 1))];

应该为

var count = images.length;
res = images[Math.floor(Math.random() * (count))];

我记得这玩意不是下标从 0 开始到 count - 1 的吗……

有道理,草率了!马上修复。

from hexo-theme-zhaoo.

HandwerSTD avatar HandwerSTD commented on June 22, 2024

好滴,另外我刚刚修锅的时候顺手把自定义图片列表的 feature 加上了,要不然我开个 PR 你看一下?可以留给可能有需要的人用,或者觉得自适应不够完美的时候也可以有个备选方案。

from hexo-theme-zhaoo.

zhaoo avatar zhaoo commented on June 22, 2024

好滴,另外我刚刚修锅的时候顺手把自定义图片列表的 feature 加上了,要不然我开个 PR 你看一下?可以留给可能有需要的人用,或者觉得自适应不够完美的时候也可以有个备选方案。

好滴!万分感谢!

from hexo-theme-zhaoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.