-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dogeorg/doge-qr-tidy
Tidy Doge-QR and README
- Loading branch information
Showing
15 changed files
with
54 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,21 @@ | ||
# doge-web-components | ||
|
||
Reusable web components for Dogecoin | ||
|
||
## Two ways to consume components. | ||
**Reusable web components for Dogecoin** | ||
|
||
Want to promote Dogecoin on your blogsite, request a tip, add a fitting Doge meme, sell a product even? | ||
Doge Components are here to make this easy for you. Browse the [Doge Component Library](todo), find some you like, | ||
Doge Components are here to make this easy for you. Browse the [Doge Component Library](https://fetch.dogecoin.org), find some you like, | ||
add them to your webpage and voilà! | ||
|
||
### 1. Cherry Pick (Under development) | ||
|
||
**Quick and easy** | ||
Within your HTML file, add a doge component and start using it. | ||
|
||
``` | ||
<script type="module" src="https://fetch.dogecoin.org/qr"></script> | ||
<doge-qr address="D89DhnsgKncmN12RejxudfU8AwXp3946q1" caption="Treat me a coffee?"></doge-qr> | ||
<script type="module" src="https://fetch.dogecoin.org/doge-qr"></script> | ||
<doge-qr address="D89DhnsgKncmN12RejxudfU8AwXp3946q1" theme="such-doge"></doge-qr> | ||
``` | ||
|
||
**Optionally**, add the initial.css stylesheet to the head of your page to prevent/reduce FOUC (flash of unstyled content). | ||
**Optionally**, add the initial.css stylesheet to the head of your page to reduce FOUC (flash of unstyled content). | ||
|
||
``` | ||
<link rel="stylesheet" href="https://fetch.dogecoin.org/initial.css" | ||
``` | ||
|
||
--- | ||
|
||
### 2. Fetch Lib (Concept) | ||
|
||
Within your HTML file, add configure.js, configure and utilise. | ||
|
||
``` | ||
<script type="text/javascript" src="https://fetch.dogecoin.org/lib/configure.js"></script> | ||
``` | ||
|
||
``` | ||
<script type="text/javascript"> | ||
dogeFetch.init({ | ||
components: ['qr', 'price', 'pal'], | ||
resourcePath: '<your-site>/resources', | ||
componentPath: '<your-site>/components' | ||
}); | ||
</script> | ||
``` | ||
|
||
``` | ||
<doge-qr | ||
address="D89DhnsgKncmN12RejxudfU8AwXp3946q1" | ||
caption="Buy me a coffee" | ||
> | ||
</doge-qr> | ||
<doge-price | ||
source="rss://coinmarketcap.com/currencies/dogecoin" | ||
curr="USD" | ||
refresh="5" | ||
> | ||
</doge-price> | ||
<doge-pal | ||
max-width="600" | ||
> | ||
</doge-pal> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { | ||
dogeComponentInit, | ||
resourceBasePath, | ||
LitElement, css, html, classMap | ||
} from "../../lib/cherry.js" | ||
LitElement, css, html | ||
} from "../../lib/doge-init.js" | ||
import "../../../resources/blocks/[email protected]/qr-code-styling.js"; | ||
|
||
export class DogeQR extends LitElement { | ||
|
@@ -17,10 +16,10 @@ export class DogeQR extends LitElement { | |
qrCanvas: {}, | ||
}; | ||
static sizes = { | ||
sm: 120, | ||
sm: 80, | ||
md: 220, | ||
lg: 320, | ||
xl: 420, | ||
lg: 340, | ||
xl: 480, | ||
} | ||
static themes = { | ||
'such-doge': { | ||
|
@@ -141,7 +140,6 @@ export class DogeQR extends LitElement { | |
|
||
connectedCallback() { | ||
super.connectedCallback(); | ||
dogeComponentInit(); | ||
} | ||
|
||
render() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.