GithubHelp home page GithubHelp logo

hugo-collapsible-code's People

Contributors

jdejager avatar jiridj avatar michaeladler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hugo-collapsible-code's Issues

needs "parseInt" function to work

Hi thanks for the shortcode β€”Β it wasn't working for me and I finally figured out that in the "makeCollapsible" function, this line:

if (div.offsetHeight > height {

Needs to be changed to:

if (div.offsetHeight > parseInt(height, 10)) {

Because the maxHeight (max-height in CSS) property is not a number, it's a string with a 'px' at the end.

Likewise the var height at the top needs to be set to '300px' rather than just 300. Is this something that changed in the last few years since you made this? Possibly. Thanks!

Question on shortcode options

Hi I am confused about what shortcode options are available to me. I ask because in code.html it shows that it can accept two different arguments.

Secondly, what syntax highlighting options are available for the shortcode?

Thirdly, and slightly unrelated, I would suggest a faq for the readme so I newbs at frontend (like me) can try to debug common problems. (For example, it took me a while to realize I had to reference the stylesheet and the script somewhere in my project's Hugo framework)

Great project btw. I got it to work. Will probably find more places to use it πŸ‘

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.