Metadata-Version: 2.1
Name: Flask-Githubcard
Version: 1.0.2
Summary: Generator a github card for flask web application
Home-page: https://2dogz.cn
Author: jiangwei
Author-email: qq804022023@gmail.com
License: Apache Software License
Keywords: flask extension development
Platform: any
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE

# flask-githubcard
A flask's extension to generate a github card for yourself.

### Quick Start 
```shell
pip install flask-githubcard
```
 Step 1: Initial the extension
 ```python
from flask import Flask
from flask_githubcard import GithubCard
app = Flask(__name__)
githubcard = GithubCard(app)
```
Step 2: In your `<head>` section of your base template add the following code:
```html
<head>
    {{githubcard.init_css()}}
    {{githubcard.init_js()}}
</head>
```
Step 3: Render the github card in your template.
```html
<div>
    {{githubcard.generate_card()}}
</div>
```

### Advanced
#### Configure yourself github info
```python
from flask import Flask
from flask_githubcard import GithubCard
app = Flask(__name__)

githubcard = GithubCard(app)
app.config['GITHUB_USERNAME'] = 'foo'
app.config['GITHUB_REPO'] = 'foo_repo'
```

#### Choose theme
```html
<head>
    {{githubcard.init_css(theme='darkly')}}
</head>
<div>
    {{githubcard.generate_card(theme='darkly')}}
</div>
```


