Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lowesyang/lowes-invitation
An automatic invitation producer plugin
https://github.com/lowesyang/lowes-invitation
Last synced: 1 day ago
JSON representation
An automatic invitation producer plugin
- Host: GitHub
- URL: https://github.com/lowesyang/lowes-invitation
- Owner: lowesyang
- License: mit
- Created: 2016-10-14T14:36:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-06T08:59:24.000Z (over 7 years ago)
- Last Synced: 2024-08-08T15:24:32.739Z (3 months ago)
- Language: JavaScript
- Size: 169 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lowes-Invitation
An automatic invitation producer plugin## Installation
Body:
```html
```Import js:
```javascript```
or
```javascript
import LowesInvite from "LowesInvite.js"
```## Usage
javascript:
```javascript
import LowesInvite from "LowesInvite.js"//Please create invitation after window loaded.
window.onload=()=>{
let name="LowesYang"
const options={
color:"#ffffff",
x:40,
y:400,
fontSize:24,
fontFamily:"Microsoft Yahei",
bold:true
}
const invitation=new LowesInvite(options);
submitBtn.onclick=()=>{
invitation.drawName(name); //Add your name to the invitation
}
resetBtn.onclick=()=>{
invitation.init(); //init invitation
}
downloadBtn.onclick=()=>{
invitation.exportImg(); //download the ready invitation
}
}
```
## Options
- ```color``` hex string
Set color of your name.
- ```x``` number
Set X-coordinate of your name.
- ```y``` number
Set Y-coordinate of your name.
- ```fontSize``` number
Set font-size of your name.
- ```fontFamily``` string
Set font-family of your name.
- ```bold``` bool
Set bold or not of your name.## API
- ```init()``` init invitation
- ```setNamePos(x,y)``` set the position of your name in the invitation
- ```setNameColor(color)``` set the color of your name
- ```drawName(name)``` draw your name in the invitation
- ```exportImg()``` download the final invitation## Example
[Smartisan Inivitation](https://github.com/yyh1102/Lowes-Invitation/tree/master/example)