Skip to content

How to create new cards (Internal Use)

ryan-bower edited this page Jun 12, 2018 · 7 revisions

Your card should abide by the following

  • Use the new card template html document located in the main repo folder
  • Do not use any external styles or scripts
  • Use internal stylesheet
  • Use internal script tags
  • Choose one fixed card size

Your card can incorporate dynamic data population through the following classes

  • .gc-login = .innerhtml = GitHub Username and href = GitHub profile
  • .gc-name = .innerhtml = GitHub Name and href = GitHub profile
  • .gc-avatar-url = img src = GitHub Avatar URL
  • .gc-avatar-link = href= Github profile
  • .gc-num-repos = .innerhtml = Number of public GitHub repos
  • .gc-repos-link = href = Link to GitHub Repos page
  • .gc-num-gists = .innerhtml = Number of public GitHub gists
  • .gc-gists-link = href = Link to GitHub Gists
  • .gc-num-followers = innerhtml = Number of GitHub followers
  • .gc-followers-link = href = Link git GitHub followers page
  • .gc-bio-text = .innerhtml = GitHub Bio Text
  • .gc-primary = style.backgroundColor = pri query string arg
Classname Required Element(s) Attribute(s) replaced Replacement value(s)
Value Class Name Attribute Affected Example Usage
GitHub Name and Link gc-name href and inner html
GitHub User Name and Link gc-login href and inner html
GitHub Avatar Image URL gc-avatar-url img src
GitHub Profile Link gc-avatar-link href
GitHub Repos Count and Link gc-num-repos and gc-repos-link href and inner html
GitHub Gists Count and Link gc-num-gists and gc-gists-link href and inner html
GitHub Followers Count and Link gc-num-followers and gc-followers-link href and inner html
GitHub Bio Text gc-bio-text inner html
Primary Card Color gc-primary background-color