DISCLAIMER: UnSplash Pro is in no way legally related to UnSplash
Before we begin, I'd like to emphasis that the
UnSplash Pro stands for
Programmer and not ...pro(whatever that stands for😝).
You see programmers have certain characteristics attributes:
- They are super lazy
- They love
- They hate choosing colors and pictures
They hate needing to go out just to snap, edit and process pictures so they can use it in some website
(like whoTF even does that anyways😂)
The point is they hate even doing these series of ultra simple steps:
- Choose pic from UnSplash
- Downloading pic from UnSplash
- Move downloaded pic to the project repo
<img src="./pathToPic"/>(and not to mention the alt)
It'd be like heaven if they had a tool of sorts that they could just copy the whole
and that's the problem UnSplash Pro solves.
Contrary to your belief, this is actually a really simple project
Check It Out @ UnSplash Pro
- React: So I could reuse a few of my previously built stuff
- FlexBox: Come on that's my greatest flex💪, I can't do any CSS without it
If you'd like to contribute(or check out the code) but pls do contribute🙏😂 here's the code on github
also the readme over there is exactly what you're reading rn so don't bother reading that
Now I've used class components for the whole project. I know I'm prolly the only person alive who still uses class components.
I have my reasons so here me out on this:
Hooks makes the whole thing easier, but you only understand components, when you know what's going on under the hood and hence the project was built with class components.
Don't worry unSplash Pro has got you covered.
This is kinda complex but still pretty easy.
It uses filesaver.js that converts the image to a blob and then sent into your downloads folder.
The first argument to
filesaver.saveAs()is the path/URL of the image, while the second argument specifies the name of the to-be-downloaded file.
I think now's the best time to apologize...
I'm super sorry for including images of the code, as a programmer I know you'd be wanting to be able to
ctrl+v, but I'm a programmer too and I'm too lazy to
- Go Up
- Delete the Images
- Pasted the Code