Giter Site home page Giter Site logo

How to auto-animate? about reveal-hugo HOT 3 OPEN

MarionMoseby avatar MarionMoseby commented on September 21, 2024 1
How to auto-animate?

from reveal-hugo.

Comments (3)

chandlerc avatar chandlerc commented on September 21, 2024 3

In case others roll up here looking for how to get this to work with the {{< slide ... >}} shortcode:

---
{{< slide auto-animate="" >}}

...

Did the charm for me. Note that the ="" is necessary! I found that very surprising, but without that everything gets confused as it processes the params as a key-value pair, and when using {{< slide auto-animate >}} it treats this as a positional parameter, with a key of 0 and a value of "auto-animate", which doesn't do anything useful. Took me a bunch of reading the shortcode source to figure that out, and so maybe worth adding to the docs somewhere.

from reveal-hugo.

davidovich avatar davidovich commented on September 21, 2024

Could you tell us what you have tried ? Are you using the latest version of reveal-hugo (which updated its embedded reveal-js at 4.4.0) ?

To my knowledge, reveal-hugo does not yet have facilitators for the auto-animate feature.

But it does support adding html in your slides:

<section data-noprocess>
  <h1>Hello, world!</h1>
</section>

With this feature, can you use the reveal-js animation blocks ?

from reveal-hugo.

davidovich avatar davidovich commented on September 21, 2024

I created a test slideshow with one _index.md file with this content in it:

+++
title = "Animations"
outputs = ["Reveal"]
+++

# Automated animations

---

<section data-noprocess data-auto-animate>
  <h1>Auto-Animate</h1>
</section>
<section data-auto-animate>
  <h1 style="margin-top: 100px; color: red;">Auto-Animate</h1>
</section>

---

Another slide

This animation block was copied from the auto-animate reveal-js documentation.

Note that you need the latest reveal-hugo as this animation feature was added with reveal-js 4.0 and reveal-hugo was updated to support 4.4.0 on February 7 2023.

from reveal-hugo.

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.