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

hall-of-mirrors

v0.2.0

Published

PhotoSwipe Image Gallery for After Dark.

Downloads

8

Readme

Hall of Mirrors

JavaScript Image Gallery for After Dark. Hall of Mirrors adds a responsive image gallery using PhotoSwipe.

Latest NPM version NPM downloads per month Minimum After Dark version WTFPL licensed

Demo

Setup

None required, unless you're hosting your site root from a path including a / such as domain.example/blog/. If so, update the url data types in default-skin.css to include the full path. Use the included bin/urlize script to facilitate this change.

Installation

  1. Copy the contents of this repository into a directory called themes/hall-of-mirrors under the root of your After Dark site.

  2. Add hall-of-mirrors as a theme component to your After Dark site config.toml, e.g.

    theme = [
      "hall-of-mirrors",
      "after-dark"
    ]
  3. Add and specify settings for the module in your After Dark site config, e.g.

    [params.modules.hall_of_mirrors]
      enabled = true # Required in version 0.x.x
  4. Create a Leaf Bundle for your images and content.

  5. Configure the content to reference the images.

  6. Build and deploy your After Dark site.

Configuration

To display a gallery add the Page Resources you wish to display to your Leaf Bundle and configure your front matter as shown.

Minimal

Display a gallery for all JPEG images in the page bundle:

[[resources]]
  src = "**.jpg" # Display any jpeg image in the leaf bundle
  name = "gallery" # Name must include the word 'gallery'

Display a gallery for images in a specific bundle subdirectory:

[[resources]]
  src = "images/gallery/**.jpg" # Restrict images to a folder
  name = "Image gallery" # Provide a more friendly gallery name

Extended

Add captions and enhance SEO by configuring individual resources:

[[resources]]
  src = "**/ray-hennessy-763310-unsplash.jpg"
  [resources.params]
    thumb_size = "750x" # Adjust size of thumbnail image
  [resources.params.meta]
    creator = "Ray Hennessy"
    description = "This is a long description. It is shown instead of the title and is intended to provide more information."

[[resources]]
  src = "**sprat**" # Glob for image with 'sprat' in the filename
  title = "Diverse succulents around a rock"
  [resources.params]
    hide_credits = true # Display title but not creator
  [resources.params.meta]
    creator = "Annie Spratt" # Maps to schema structured data

[[resources]]
  src = "**/blake-richard-verdoorn-20063-unsplash.jpg"
  title = "Bridge over a green waterfall"
  [resources.params]
    hide_credits = true
    thumb_size = "350x"
  [resources.params.meta]
    creator = "Blake Richard Verdoorn"
    keywords = ["nature", "waterfall", "bridge"]

[[resources]]
  src = "images/gallery/**.jpg"
  name = "Nature gallery"
  [resources.params.meta]
    genre = "digital" # Set genre meta for all gallery images

This should get you started. Expect some breaking changes as the development is finalized.

Contributing

Please squash commits and use Convention Commit messages. Run npm run commit after installing NPM dev dependencies for help creating conventional commit messages.k

Rights

Copyright (C) 2018, 2019 by Josh Habdas [email protected]

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

The text of the above license is included in the file COPYING in the source.