npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

reveal-splash

v1.0.2

Published

A Reveal.js plugin that displays a splash image until the presentation is fully loaded.

Downloads

97

Readme

reveal-splash Plugin

Effortlessly elevate your Reveal.js presentations with a sleek, customizable splash screen.

Motivation

When using Reveal.js to write extensive lectures, I encountered long load times as the presentations grew larger. To improve the user experience, I wanted a splash screen that would display while the content loaded. The reveal-splash plugin was created to address this need, offering flexibility and customization to suit any presentation style.

Installation

Option 1: Direct HTML Include

Include the plugin directly in your HTML file:

<script type="module">
    import Splash from './path/to/reveal-splash.esm.js';
</script>

Option 2: Install via npm

If you’re using a Node.js environment, install the plugin via npm:

npm install reveal-splash

Then, import the plugin in your JavaScript file:

import Splash from 'reveal-splash-plugin';

Basic Usage

To use the reveal-splash plugin, include it in the Reveal.initialize function and configure it according to your needs:

Reveal.initialize({
    plugins: [Splash],
    splash: {
        splashImage: false,
        backgroundColor: "#33aa33",
        text: "Loading presentation, please wait...",
        fontOptions: {
            fontFamily: "Verdana, sans-serif",
            fontSize: "20px",
            color: "#ffffff",
        },
        minimumDisplay: 2
    }
});

Note: If I'm not mistaken, reveal.js will load each plugin asynchronously, so you may see other plugins at work before this kicks in.

Configuration

The plugin offers several configuration options to help you create the perfect splash screen:

| Option | Type | Default | Description | |--------------------|-----------------|-------------------------------------------------|---------------------------------------------------------------------------------------------| | splashImage | Boolean/String | false | Specifies the image to display on the splash screen. If false, a spinner will be used. | | backgroundColor | String | "#ffffff" | The background color of the splash screen. Accepts any valid CSS color. | | text | String | "Loading..." | The text to display on the splash screen. Can be a plain string or HTML. | | fontOptions | Object | { fontFamily: "Arial, sans-serif", fontSize: "18px", color: "#333" } | An object defining the font properties of the splash text. Supports standard CSS font properties. | | minimumDisplay | Number | 1 | The minimum time (in seconds) that the splash screen should be displayed. |

Example Configuration Snippet

Here’s a snippet showing how to configure the splash screen with a custom image, HTML text, and styling:

Reveal.initialize({
    plugins: [Splash],
    splash: {
        splashImage: 'img/splash-logo.png',
        backgroundColor: '#444',
        text: '<p>Loading <code>reveal-splash</code> demo...</p>',
        fontOptions: { color: "#ffffff", fontSize: "36px" },
        minimumDisplay: 5
    }
});

Advanced Customization

You can further enhance the splash screen by using custom HTML and CSS animations. Here’s an example of how to create a neon glow effect for the splash screen text:

In your splash configuration:

...
text: '<p class="neon-glow">Make a Splash with reveal-splash!</p>',
...

In the head of your presentation, or in an imported css file:

.neon-glow {
    color: #00FFFF;
    text-shadow: 
        0 0 5px #00FFFF,
        0 0 10px #00FFFF,
        0 0 20px #00FFFF,
        0 0 30px #00FFFF,
        0 0 40px #00FFFF,
        0 0 50px #00FFFF,
        0 0 75px #00FFFF;
    animation: pulse 1.5s infinite alternate, flicker 2s infinite;
}

Issues and Contributing

If you encounter any issues or have suggestions for improvements, please open an issue on GitHub. Contributions are welcome!

Acknowledgements

Special thanks to the authors of Reveal.js for their incredible work on such a versatile and powerful presentation framework. This plugin was created and tested with Reveal.js version 5.1.0.

Notes

  • This plugin is designed to work seamlessly with Reveal.js.
  • Ensure that your splash screen configurations match the overall theme and style of your presentation for the best user experience.