Project Link - https://codepen.io/Hartecode/full/EwVeQa/
Project Link - https://codepen.io/prokop/full/XemEdZ/
i think i couldāve used better colors but still im happy with what i did
any criticism is very welcome
@Hartecode looks good. I would just add some padding to the entries because the words are so close to the border it would just look better with some space.
@rusakkk I like the look of your wiki viewer. It just took me a second to notice the results came up once I entered my search. Idk if it would be better to move up the search bar so people can see the results easier but either way looks good.
Hereās mine : https://codepen.io/tchbell/full/eGZaZa/
Hello guys, just finished my wikipedia viewer.
Your feedback would be much appreciated. Thanks!
@tchbell thanks for your feedback, Iāll improve my project. I like yours project too. Hover transitions are the best what I ever seen
Hereās a link to my project.
Love the fade-in when the results appear! I had to apply my own after seeing yours.
Very nice design, very colorful!
Project Link -https://codepen.io/zapbampow/full/NavoRe/
Just finished up my Wikipedia Viewer. Iām mostly happy with it. I wanted to have images come up with the search results. I played around a bunch with the API and this was the best I could do. Some results have images. So donāt. Otherwise, Iām happy with the work I did and feel good about my growing confidence.
This islink to my wikipedia viewer . Tried to keep it a bit simple . Would welcome suggestions or corrections .
Please watch mine and give me more opinions
Not trying to make it look pretty, just recently got into React and want to practice.
Live: http://ncaron.github.io/wikipedia-viewer/
Code: https://github.com/ncaron/wikipedia-viewer
Thus far Iāve got the page titles and snippets, along with the page ID (and hence URLs) - in other words, challenge complete! But the imagesā¦ I want images!
I know there is an option using a single JSON (providing title, short description and thumbnail), but I was hoping to get the text snippet, and from the looks of it, it canāt be done with a single JSON request.
The image JSON URL requires the page title, so I made an array of titles, then looped through them to get an array of images (as confirmed by console.log). BUT if I loop through that array to actually create the images ("<img src='" + imgs[i] + "'>"
), the src content shows as undefined.
Why is this? Iām guessing itās that the JSON value looks like a String, but isnātā¦ Yet I canāt work out how to get it right. Stringify does nothingā¦
function searchWiki() {
var titles = [];
var imgs = [];
var input = document.getElementById("searchTerm").value;
var url = "https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&utf8=1&srsearch=" + input + "&srprop=snippet&callback=?";
$.getJSON(url, function(data) {
var pages = data.query.search;
for (var i = 0; i < 10; i++) {
titles.push(pages[i].title);
var url2 = "https://en.wikipedia.org/w/api.php?action=query&format=json&titles=" + titles[i] + "&prop=imageinfo&iiprop=url&generator=images&callback=?"
$.getJSON(url2, function(data2) {
imgs.push(data2.query.pages["-1"].imageinfo[0].url);
});
}
console.log(imgs);
});
}