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

leonidas

v1.45.69

Published

Markdown of the 21st century

Downloads

5

Readme

Getting Started with Leonidas

Markdown of the 21st century

Leonidas is a Markdown Extention powered by React and Javascript Leonidas serves to add CSS features like color, background-color to your Markdown. It has support for HTML, CSS and even Basic Javascript It even supports forms, data binding, and even API usage.

Getting Started

Simply install it with this command

npm i leonidas

Write that and you're ready to go!

Adding Leonidas to your project

To Import Leonidas, use the following code

import Leonidas from "leonidas";

function App() {
  return (
    <div className="App">
      <Leonidas text={"@(fontSize:10vw) # Hello World!"} />
    </div>
  );
}

export default App;

Leonidas Properties

To Add a property, just type @(your-property-name:your-value) All CSS properties are supported and should have the same names. However, names with hyphens, like background-color become backgroundColor, and margin-left becomes marginLeft. Otherwise it should be the same

Leonidas Units.

All CSS Units are supported However, the default unit is rem instead of the default pixel. Everything is Responsive by default

Leonidas Modules

Modules Supported are:

  1. rehype-raw :
    • To Add type -(add:html)
    • To Remove type -(remove:html).
    • Added by default.
    • Used for HTML
  2. rehype-sanitize :
    • To Add type -(add:sanitize)
    • To Remove type -(remove:sanitize)
    • Added by default
    • Used for Sanitization of Document
  3. rehype-katex :
    • To Add type -(add:katex)
    • To Remove type -(remove:katex)
    • Not Added by default.
    • Used for Syntax Highlighting
  4. remark-gfm :
    • To Add type -(add:ttu)
    • To Remove type -(remove:ttu)
    • Added by default
    • Used for Tables, Links, Images, Lists, etc
  5. remark-math :
    • To Add type -(add:math)
    • To Remove type -(remove:math)
    • Not Added by default
    • Used for Math

Leonidas Templates

View the Template source here. There are a wide number of templates which make your job easier

Examples


Cool Text

import Leonidas from "leonidas";

function App() {
  return (
    <div className="App">
      <Leonidas text={`
      @(color:lightblue)
      @(textAlign:center)
      @(fontKerning:none)
      @(fontWeight:500)
      @(letterSpacing:10px)
      @(outline: 5px solid white)
      @(textShadow: 2px 5px magenta)
      @(transform: skewY(-10deg)
      @(zoom:1.2)
      @(marginBottom:100px)
      
      # Leonidas!`} />
    </div>
  );
}
Output

img

Media
import Leonidas from "leonidas";

function App() {
  return (
    <div className="App">
      <Leonidas text={`
      @(borderLeft:10px solid black)
      @(fontSize:10vw)
      @(color:black)
      @(fontKerning:none)
      
      # Image
      ![image](https://images.pexels.com/photos/326055/pexels-photo-326055.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=350&w=140)

      # Link
      [Link to Picture](https://images.pexels.com/photos/326055/pexels-photo-326055.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=350&w=140)

     # Email
     <[email protected]>
      `} />
    </div>
  );
}
Output

img


Other

View the Github Repo here This Website was Developed by me, Lakshya Jain, a 13 year old asian, so you know it's going to be good 😅

Happy Hacking 😊!!