pmd-quiz-online icon indicating copy to clipboard operation
pmd-quiz-online copied to clipboard

Add share button

Open carmona44 opened this issue 2 years ago • 3 comments

On the result page, add a share button for Twitter or just a "copy link" option that includes a screenshot and a link to the quiz. I have many friends who are fans of pokemon and who would like to share the picture of the pokemon that best represents their personality.

I think this functionality can give the project a lot of visibility and can make a snowball effect by attracting new people as happened with WORDLE few months ago.

carmona44 avatar Nov 06 '22 13:11 carmona44

Hi! I've considered this way before release, but I ran into a lot of problems. I can easily add a share to Twitter or a copy link button. But I can't add the screenshot, due to technical reasons the API doesn't allow you to just screenshot the page.

I tried libraries such as html2canvas (which don't work because it doesn't support CSS border-image feature), I also tried dom-to-img lib which also didn't display the image border... After many hours of failed attempts I thought it wasn't possible. I also asked in the Svelte discord server and no one knew.

I'm still thinking about it but right now I'm a little stuck 😔

Nrosa01 avatar Nov 06 '22 15:11 Nrosa01

Oh! That doesn't sound good.

I can't recommend you any library or framework for that because I've never used Svelte or implemented this functionality before. I've read that it is your first web project so don't worry, being stuck is quite common at some point in development.

Don't give up for that, there is an answer somewhere you just haven't found it yet.

PS: don't try to do it perfect the first time, it's better to have something practical at the beggining and then improve it over time.

carmona44 avatar Nov 06 '22 16:11 carmona44

Sure! I'm not giving up, I'm just pausing it for a while because I don't want to fail any college subjects for this >< Once I get more time I'll try it it again

Nrosa01 avatar Nov 06 '22 16:11 Nrosa01