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

@codersrank/timeline

v0.9.2

Published

Codersrank Timeline Widget

Downloads

827

Readme

Codersrank Timeline Widget

Codersrank Timeline Widget is a web component that allows you easily integrate your work experience or portfolio information in a form of a timeline from your CodersRank profile to your personal website:

Install from NPM

Widget script available through NPM:

npm i @codersrank/timeline --save

After installation you need to import and register web component:

import CodersrankTimeline from '@codersrank/timeline';

// register web component as <codersrank-timeline> element
window.customElements.define('codersrank-timeline', CodersrankTimeline);

Install from CDN

Widget can also be downloaded or linked directly from CDN:

<!-- replace x.x.x with actual version -->
<script src="https://unpkg.com/@codersrank/[email protected]/codersrank-timeline.min.js"></script>

In this case it is not required to register web component, it is already registered as <codersrank-timeline> element.

Usage

As it is a web component the usage is pretty simple, just add widget HTML tag with your CodersRank username

<codersrank-timeline type="technologies" username="YOUR_USERNAME"></codersrank-timeline>

Widget Attributes

Widget supports following properties as HTML element attributes:

| Name | Type | Default | Description | | ---------- | --------- | ---------------- | ---------------------------------------------------------------------------------- | | username | string | | Your CodersRank username | | type | string | workexperience | Specify which data to show. Can be workexperience, portfolio or technologies | | branding | boolean | true | Displays "Powered by CodersRank" link |

For example:

<codersrank-timeline username="YOUR_USERNAME" type="workexperience"></codersrank-timeline>

Styling

It is possible to customize widget colors with CSS Custom Properties (CSS Variables) by setting them directly on the widget element with style attribute or in CSS.

There are following CSS Custom Properties are available:

| Property | Value | | ----------------------------- | -------------------------------- | | --preloader-color | #72a0a8 | | --year-font-size | 12px | | --year-opacity | 0.5 | | --year-height | 24px | | --year-text-color | currentColor | | --year-line-color | currentColor | | --year-line-opacity | 0.25 | | --col-width | 24px | | --row-height | 36px | | --timeline-item-bg-color | #f1f1f1 | | --timeline-item-text-color | inherit | | --timeline-item-font-size | 12px | | --timeline-item-padding | 4px 8px | | --timeline-item-border-radius | 4px | | --tooltip-logo-size | 32px | | --tooltip-font-size | 14px | | --tooltip-width | 320px | | --tooltip-padding | 16px | | --tooltip-bg-color | #fff | | --tooltip-border-radius | 4px | | --tooltip-text-color | #333 | | --tooltip-box-shadow | 0px 10px 20px rgba(0, 0, 0, 0.1) | | --tag-border | none | | --tag-star-color | #ff9900 | | --tag-bg-color | rgba(0, 0, 100, 0.075) | | --tag-font-size | 0.85em | | --tag-font-weight | bold | | --tag-padding | 0.35em 0.57em | | --tag-margin | 0.28em | | --tag-border-radius | 4px | | --tag-text-color | inherit | | --branding-text-color | inherit |

For example, to change year label font-size 14px, add this to CSS stylesheet:

codersrank-timeline {
  --year-font-size: 14px;
}

Contribution

Yes please! See the contributing guidelines for details.

Licence

This project is licensed under the terms of the MIT license.