0.4.1 • Published 1 month ago

profile-components v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

profile-components

Web components which display profile information from various websites

Components

GitHubUser

GitHub user profile web component

Summary: Native web component which shows a GitHub user's profile content. Can use local data, fetch data from the GitHub rest API, or use a combination of both.
Element: github-user
Properties

NameTypeDescription
loginstringUser's GitHub login
avatar_urlstringURL to user's avatar
namestringUser's name
fetchbooleanwhen true, fetches user from the GitHub api
usernamestringalias for login
biostringUser's biography content
followingstringnumber of people user is following
followersstringnumber of followers
reposstringJSON stringified array of repositories
themestringcolor theme for the component

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/github-user.js"></script>

<!-- use the custom element -->
<github-user login="scottnath" fetch="true"></github-user>

GitHubRepository

GitHub repository web component

Summary: Native web component which shows a GitHub repository's content. Can use local data, fetch data from the GitHub rest API, or use a combination of both.
Element: github-repository
Properties

NameTypeDescription
full_namestringrepository org and name, as in scottnath/profile-components
fetchbooleanwhen true, fetches repo from the GitHub api
namestringrepo name
orgstringrepo owner organization's login, found at <REST_RESPONSE>.organization.login
descriptionstringrepo description
languagestringprogramming language used in repo
stargazers_countstringnumber of stars
forks_countstringnumber of forks
subscribers_countstringnumber of watchers
itempropstringItemprop content to go with a containing component's itemscope
no_orgstringDo not include the repo owner or organization
themestringcolor theme for the component

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/github-repository.js"></script>

<!-- use the custom element -->
<github-repository full_name="scottnath/profile-components" fetch="true"></github-repository>

DevtoUser

dev.to user profile web component

Summary: Native web component which shows a dev.to user's profile content. Can use local data, or fetch data from the dev.to API, or use a combination of both.
Element: devto-user
Properties

NameTypeDescription
usernamestringUser's dev.to username
fetchbooleanwhen true, fetches user and posts from the Forem API
namestringThe name of the user
summarystringThe user's bio
joined_atstringThe date the user joined
profile_imagestringThe URL of the user's profile image
post_countnumberThe number of posts the user has published
latest_poststringUser's latest post content, JSON stringified
popular_poststringUser's most popular post content, JSON stringified
themestringcolor theme for the component

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/devto-user.js"></script>

<!-- use the custom element -->
<devto-user username="scottnath" fetch="true"></devto-user>

DevtoPost

dev.to post web component

Summary: Native web component which shows a dev.to (or forem.dev) post. Can use local data, fetch data from the dev.to API, or use a combination of both.
Element: devto-post
Properties

NameTypeDescription
idnumberPost ID
titlestringPost title
urlstringPost URL
cover_imagestringPost cover image URL
social_imagestringPost social image URL
fetchbooleanwhen true, fetches post from the Forem API

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/devto-post.js"></script>

<!-- use the custom element -->
<devto-post id="123456" fetch="true"></devto-post>
0.4.1

1 month ago

0.4.0

1 month ago

0.3.1

2 months ago

0.3.0

3 months ago

0.2.6

3 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.5

7 months ago

0.2.4

7 months ago

0.1.2

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.5

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago