-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save card as image #4
Comments
https://github.com/tsayen/dom-to-image may be a solution, but it looks abandoned. |
Could you elaborate your problem? Maybe we image concept or a link to where should I deal with? Right now, I don't understand at these point:
|
When you use the Share feature inside Catima, you generate a link like https://catima.app/share/#store%3DExample%26note%3D%26balance%3D0%26cardid%3D1234%26barcodetype%3DQR_CODE%26headercolor%3D-1784274. If you have Catima installed, Catima can import this card. If not, you can open the URL in your browser and see an image of the card. Being able to download the displayed card as an image might be helpful for people who don't want to install Catima or who aren't on Android. |
Thanks for clarifying. Two last questions, a whole card need to be exported or just a QR code is important? How did you generate QR code. Be honest, this may not an easy task that can be done in a few hours. So if I can accept the task, please be patient. |
I think saving the whole thing is probably more useful because at a store you may want to also have the other info like the amount of points. The current generation is done with bwip-js, and there is some Javascript code inside the Markdown that's turned into HTML: https://github.com/CatimaLoyalty/Website/blob/main/_pages/share.md?plain=1#L36-L155 Given not many users will likely use a feature like this, keeping it simple sounds fine. Perhaps the simplest solution is to use CSS3 media queries to set |
I did this feature one in a project of my old company. My way was put them in a canvas and download image (JPG/PNG) of that canvas. It has a bit downside and edge case (on safari, at least that what I was reported to). But consider the size of card is small, maybe we can go with that case. |
To make it even nicer for non-Catima users to deal with received cards.
The text was updated successfully, but these errors were encountered: