Skip to content

Sandeepdwivediii/Github-Cards-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github-Cards-Api

Table of Contents

Usage

Visit the following endpoint URL for all available cards and their respective options:
https://afraid-ninnetta-github-cards.koyeb.app/

You can embed one of the available cards in your README using either Markdown OR HTML:

Using Markdown

<!-- Markdown -->
![Card](https://afraid-ninnetta-github-cards.koyeb.app/any_card_name)

Using HTML

<!-- HTML -->
<img src="https://afraid-ninnetta-github-cards.koyeb.app/any_card_name" alt="Card" />

Available Cards

Here is a list of cards that can currently be used:

Available Cards Example Preview
jokes-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/jokes-card?theme=dark) Card
programming-quotes-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/programming-quotes-card) Card
motivational-quotes-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/motivational-quotes-card) Card
word-of-the-day-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/word-of-the-day-card) Card
challenge-of-the-week-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/challenge-of-the-week-card) Card
team-work-quote-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/team-work-quote-card) Card
bhagavad-geeta-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/bhagavad-geeta-card) Card
random-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/random-card) Card
programming-facts-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/programming-facts-card?theme=dark) Card
top-tweets-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/top-tweets-card) Card
spanish-quote-card ![Card](https://afraid-ninnetta-github-cards.koyeb.app/spanish-quote-card?theme=dark) Card

Themes

Options

You can customize the appearance of the cards by selecting one of the following themes:

  1. light
  2. dark
  3. dark_2
  4. rgb
  5. lemonade
  6. pattern_1
  7. pattern_2
  8. pattern_3
  9. random - A random theme from those listed above will be applied
  10. custom - You may set your own custom arguments

Custom Arguments

If you choose the custom theme, you can configure the card with the following arguments:

args: {
    card_color: "Card color. Default: #ffffff  [Optional]",
    font_color: "Card text color. Default: #000000  [Optional]",
    bg_color: "Card Background color. Default: #fff  [Optional]",
    shadow: "Card shadow. Default: false  [Optional]",
    shadow_color: "Card shadow color. Default: #000000  [Optional]",
},

Examples

  • Light Theme Card

    Card

  • Dark Theme Card

    Card

  • Dark_2 Theme Card

    Card

  • Rgb Theme Card

    Card

  • Lemonade Theme Card

    Card

  • Pattern_1 Theme Card

    Card

  • Pattern_2 Theme Card

    Card

  • Pattern_3 Theme Card

    Card

Contributing

Adding a New Card

  1. Fork this repository.
  2. Add your card in the src/cards directory. You can refer to the existing cards for guidance.
  3. If your card needs data, add a file inside the data directory (supported languages: English and Hindi).
  4. Add a route for your card in the index.js file.
  5. Update the src/help.js file and the README with your new card's API reference.
  6. Create a pull request.
  7. Ensure your data file has at least around 100 entries.

You can also create cards in HTML and CSS! Check out the src/cards/motivational-quote.js file to see how cards are generated with unique styles using HTML and Satori. Refer to the official Satori documentation here for supported CSS properties.

Adding a New Theme

  1. Fork this repository.
  2. If you want to add a gradient background, add your gradient code in src/gradients.js (refer to the existing gradients).
  3. Add your theme name to the src/themes.js file, placing it second-to-last in the array and ensuring the name is unique.
  4. Define your theme in src/themes.js (refer to existing themes for structure).
  5. Update the src/help.js file and the README with your new theme's API reference.

Additional Information

For more information, visit https://afraid-ninnetta-github-cards.koyeb.app/.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%