Hello PC readers, welcome back to my blog!
This is the final PR for my Release 0.2! Woo-hoo! What a journey.
I worked on this repository for PR 3 and as I mentioned it was made for Hacktoberfest to work and I never worked on Vue before so I chose to work on another issue for this one. The issue was to use a random image for the background from Unsplash whenever the tab was loaded and to add credits for the image displayed in the background randomly. Well, it was not an easy one.
I never heard of Unsplash before too, hence I researched about it a bit. And found out that it is a very big database of images from thousands of categories and photographers. It is very developer friendly too, I found the way to render the random images to backgrounds from one of the website's developers helping snippets. I used the image but then the text kind of went unreadable on some of the random images. I tried many ways like opaque and other things, but at last I figured using the font color as White is the best bet.
Then the next thing I had to fix was using the background image in the full screen, and not the current case :being rendered in the div area. I researched for sometime and tried few things, at last, found the fix for it by using height of background image as 100vh.
Next thing I had to do to finish this assignment was to add credits for the photographers of these random images. For that I needed to fetch data from API of Unsplash and there was a hiccup on the road as I mentioned in my PR too for the moderator. I had to create an account to fetch the photographer for the rendered image and there was a limitation like mentioned below:
Final app screen:
PR request: https://github.com/EricTurf/hacktober-new-tab/pull/11
Issue: https://github.com/EricTurf/hacktober-new-tab/issues/6
This was a good PR to learn a lot of things which I have not done before. I got to explore Unsplash, Vue JS etc. I loved working on new things, a bit tricky and needed research but got it to work. It could be better of course if more time is spent on it.
So that is it for this PR. See you in the next blog!
Best,
PC
No comments:
Post a Comment