Socket
Socket
Sign inDemoInstall

@codersrank/timeline

Package Overview
Dependencies
0
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @codersrank/timeline

Codersrank Timeline Widget


Version published
Weekly downloads
221
decreased by-6.36%
Maintainers
5
Install size
212 kB
Created
Weekly downloads
 

Readme

Source

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/timeline@x.x.x/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:

NameTypeDefaultDescription
usernamestringYour CodersRank username
typestringworkexperienceSpecify which data to show. Can be workexperience, portfolio or technologies
brandingbooleantrueDisplays "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:

PropertyValue
--preloader-color#72a0a8
--year-font-size12px
--year-opacity0.5
--year-height24px
--year-text-colorcurrentColor
--year-line-colorcurrentColor
--year-line-opacity0.25
--col-width24px
--row-height36px
--timeline-item-bg-color#f1f1f1
--timeline-item-text-colorinherit
--timeline-item-font-size12px
--timeline-item-padding4px 8px
--timeline-item-border-radius4px
--tooltip-logo-size32px
--tooltip-font-size14px
--tooltip-width320px
--tooltip-padding16px
--tooltip-bg-color#fff
--tooltip-border-radius4px
--tooltip-text-color#333
--tooltip-box-shadow0px 10px 20px rgba(0, 0, 0, 0.1)
--tag-bordernone
--tag-star-color#ff9900
--tag-bg-colorrgba(0, 0, 100, 0.075)
--tag-font-size0.85em
--tag-font-weightbold
--tag-padding0.35em 0.57em
--tag-margin0.28em
--tag-border-radius4px
--tag-text-colorinherit
--branding-text-colorinherit

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.

Keywords

FAQs

Last updated on 21 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc