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

sexy-table

v0.0.26

Published

A good looking HTML5 table that's not a table :)

Downloads

23

Readme

SexyTable

A good looking HTML5 table that's not a table :)

This project is a concept that I will be using in an up coming commercial project that I am involved with. I was looking for a client side component like:

  • https://www.datatables.net/
  • http://www.jtable.org/
  • http://www.dynatable.com/

I wanted a table that was sortable, filterable, searchable and pageable. I also had a design to follow that called for various fancy drop shadows, animations and other CSS3 goodies that can not easily be applied to a traditional HTML <table>.

Dynatable was closest to meeting my requirements. See: http://www.dynatable.com/#rendering

However I was already using a client side view framework, Transparency.js And I felt that there was a lot of double up between Dynatable and Transparency. See: http://leonidas.github.io/transparency/

So What Is SexyTable:

It is a table like client side component, built with HTML, CSS & JS.

In actual fact this could be refactored using the new Web Components APIs. However I required IE8+ compatibility and figured Web Components was just too new for my commercial project. See: http://webcomponents.org/

<div class="sexy-table">
    <ul>
        <li>Row 1 : Cell 1</li>
        <li>Row 1 : Cell 2</li>
        <li>Row 1 : Cell 3</li>
    </ul>
    <ul>
        <li>Row 2 : Cell 1</li>
        <li>Row 2 : Cell 2</li>
        <li>Row 2 : Cell 3</li>
    </ul>
</div>

At it's simplest a UL element represents a ROW of the table and an LI element represents a CELL of that ROW.

The advantage is that each CELL is now a block element that we have greater control over with CSS. But because of this we lose the normal built in table sizing functionality thus we use some javascript to explicitly set the height of each row and the width of each cell.

The other features, sorting, searching, filtering and data binding are all built on top of this concept. Please see the examples folder for more info.

Installation:

BOWER:

bower install sexy-table --save

NPM:

npm install sexy-table --save

THEN:

<link rel="stylesheet" href="./dist/SexyTable.css" />
<script src="./dist/SexyTable.js"></script>

NOTE: TypeScript users may also reference the SexyTable.d.ts definitions file.

OR

Make use of the "tsd link" feature. see: https://github.com/Definitelytyped/tsd#link-to-bundled-definitions

Dependencies:

To make use of all of SexyTable's great features there are a number of other third party dependencies. Instead of bundling these with SexyTable and forcing you to include large amounts of potentially unused javascript in your application.

It is up to you to include the packages as you need them:

  • All our examples use http://necolas.github.io/normalize.css/ Results may vary with other CSS Reset solutions.

  • To support IE8, you must include https://github.com/brad-jones/lt-ie-9 or similar.

  • Sortable Tables require http://fortawesome.github.io/Font-Awesome/ Or other CSS rules to set the icons.

  • Searchable and Filterable tables require http://lunrjs.com/

  • Data Bound Tables make use of http://leonidas.github.io/transparency/ however similar view frameworks could be used easily enough.

  • Editable Tables require Mousetrap https://craig.is/killing/mice.

At a minimum you must include jQuery before SexyTable!

NOTE: All the examples show you exactly what is required.

Building:

If you wish to build SexyTable from the TypeScript/Less sources:

  • Install Gulp http://gulpjs.com/

  • Install Tsd http://definitelytyped.org/tsd/

  • (Optional) Install & Setup your Fav Typescript IDE.
    Highly recommend: https://atom.io/packages/atom-typescript

  • git clone [email protected]:brad-jones/sexy-table.git

  • cd ./sexy-table

  • npm install

  • gulp watch

  • Edit the sources as you see fit. Gulp will watch for changes and compile automatically for you.

I Confess:

The table has no pre built sexy looking themes. In fact I have purposefully left the styling as basic as possible so that it can easily be overwritten.

In short get YOUR graphic designer to make it look sexy :)


Developed by Brad Jones - [email protected]