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

cistercian-numerals

v1.1.1

Published

A collection of web components to display cistercian numerals

Downloads

13

Readme

Cicstercian numerals components

A collection of web components to display cistercian numerals.

You can see a live demo in this article: A clock based on Cistercian numerals.

Usage (or install)

You can directly load these components in your web page using a smart CDN like jspm, unpkg or Skypack.

⚠️ WARNING: Remember that you need to trust this project AND those smart CDNs before loading some third party code like that.

Load from jspm

To load the components from jspm, add this to your <head>:

<script type="module" src="https://jspm.dev/cistercian-numerals"></script>

Load from unpkg

To load the components from unpkg, add this to your <head>:

<script type="module" src="https://unpkg.com/cistercian-numerals"></script>

Load from skypack

To load the components from skypack, add this to your <head>:

<script type="module" src="https://cdn.skypack.dev/cistercian-numerals"></script>

Install from npm

You can also install the components in your project with npm:

npm install cistercian-numerals

Then, you will need to import the components in your source:

import 'cistercian-numerals';

NOTES:

  • You will need some kind of bundler or equivalent tool to resolve the bare identifier cistercian-numerals to a local file.
  • This will import a bundle containing all the components + LitElement's sources.

You can also import the raw source if you just want the <cistercian-number> component or even if you're also using LitElement:

import 'cistercian-numerals/src/cistercian-number.js';

Components

<cistercian-number>

This component displays one number with cistercian numerals.

Use the value attribute to specify the number you want to display:

<cistercian-number value="1972"></cistercian-number>

By default, it will display the image as a block. If you want to display the number inside a paragraph of text, use the inline attribute. It should be sized and aligned correctly with the text:

Some text <cistercian-number value="1972" inline></cistercian-number> around the number.

By default, the line use the same color as the text. You can adjust the colors of the different lines with CSS custom properties:

cistercian-number {
  --cistercian-color-0: #00000000; /* Color of the center line (always displayed) */
  --cistercian-color-1: #0019a7dd; /* Color of the top line */
  --cistercian-color-2: #751056dd; /* Color of the oblique NW-SE line */
  --cistercian-color-3: #007229dd; /* Color of the bottom line */
  --cistercian-color-4: #db241fdd; /* Color of the oblique NE-SW line */
  --cistercian-color-5: #fdcd01dd; /* Color of the right line */
}

You can also adjut the width of the lines. Use a pixel value between 1px and 3px.

cistercian-number {
  --cistercian-width: 2px;
}

By default, the height of a number is 1em. You can of course adjust this by changing the font-size:

cistercian-number {
  font-size: 10em;
}

<cistercian-clock>

This component displays a live clock using cistercian numerals.

If you just want to display the current time (hours, minutes, seconds):

<cistercian-clock></cistercian-clock>

If you just want to display the current time but without seconds (hours, minutes):

<cistercian-clock no-seconds></cistercian-clock>

If you just want to display the current date and time (year, month, day, hours, minutes, seconds):

<cistercian-clock date></cistercian-clock>

About this project

Back in January 2021, I saw a tweet talking about cistercian numerals. I was very intrigued.

A week later, I saw someone who made a React component for it: https://twitter.com/aqandrew/status/1349762018639638528

I thought it would be a fun side projet to create a web component for this and then reuse the single number component to create a clock. I took this opportunity to try Twitch and wrote the code for the first version live with some help from the chat. At the end of the stream, the component was mostly working but no animation and the design was a bit clunky. I improved it over the next few weeks.

Since then, I saw a few fun projects with cistercian numerals:

  • Clairvo, a proof-of-concept font that uses OpenType Layout to implement cistercian numerals: https://github.com/TiroTypeworks/Clairvo
  • Cistercian SVG by Adrian Roselli: https://adrianroselli.com/2021/02/cistercian-svg.html
  • React based experiment by Maciej Ziarkowski: https://mz8i.com/cistercian