Hello, everyone!
Thought I’d drop in to share and ask some feedback on my Wikipedia Viewer project. I’m not 100% done with it yet, but I do want to see all opinions I can.
Thanks much for the attention and take care!
Hello, everyone!
Thought I’d drop in to share and ask some feedback on my Wikipedia Viewer project. I’m not 100% done with it yet, but I do want to see all opinions I can.
Thanks much for the attention and take care!
You forgot a var
/ let
keyword before page
here:
for (page in data.query.pages) {
Check out template literals. You can write more pleasant HTML in your javascript.
var insert = `<div class="col-xs-12 result__item">
<h3 class="result__title">
<a href="https://www.wikipedia.org/wiki/${encodeURI(page.title)}" target="_blank">${page.title}</a>
</h3>
<p class="result__snippet">${page.snippet}</p>
</div>`;
Loading more results after scrolling to the bottom is nice. You could add some animation (or spinning icon) there so it’s obvious that data is being loaded.
Thanks for the input! I’ll look into template literals and add a loading icon as soon as I can.
nice and simple. maybe change the header colour on the results output. that red/pink is hurting my eyes =(
Alright, guys, I’ve updated the CodePen with the suggestions you gave me. Feel free to take a look if you’re up to.