fac-17 / bgip Goto Github PK
View Code? Open in Web Editor NEWPearls of Wisdom (week 8)
Home Page: https://perls-of-wisdom.herokuapp.com/
Pearls of Wisdom (week 8)
Home Page: https://perls-of-wisdom.herokuapp.com/
dons hacker hat
puts on troll sunglasses
I was able to delete the required
attributes from the form input fields and submit an empty form. Server side validation wasn't a priority for this week, so it's absolutely ok not to have it, just thought I'd point it out, as it's easy to overlook in future weeks' projects :)
Nice tests that still pass, one folder - tests.js is empty.
Currently, you can only see quotes in a given category. It would be nice to see a list of all the quotes.
Other stretch ideas.
You might like this extension for chrome that rips the feed out of your facebook and instead just shows an inspirational quote. It's open-source so you can look at the code and their list of quotes =]
Is the search button do something?
Do you need the promise in this?
if (selectDropDown) {
const category = selectDropDown.value;
document.querySelector("#categoryButton").addEventListener("click", e => {
e.preventDefault();
fetch(`/quotes/searchcategory/${category}`).then(response =>
);
});
}
It looks like it's just console logging, i tried deleting it and everything looks like it's still working
I have to say it ;) well done! It's simple and harmonious. Good choice of font for the Quicksand ;)
When you try and load different categories using this endpoint - https://perls-of-wisdom.herokuapp.com/quotes/category/movies
if you change it something like this https://perls-of-wisdom.herokuapp.com/quotes/category/gjsjnfsjnfse
You get the page loaded without any data, it would be cool if either you couldn't navigate to an endpoint thats not on the list, or if you do you get a message saying there are no quotes within that category
You have duplicate code for the body and footer tags in stylehome.css and styleQuotes.css.
Doesn't yet redirect to home
I think you can scale up the size of the form and the font on the form
On lines 12-14 of this file you’re handling the endpoints for when a user searches for a quote category. I could be mistaken, but isn’t line 17 doing pretty much the same thing, minus the redirect?
In your script.js file (public/js/script.js), instead of making the fetch request to "/quotes/searchcategory/${category}", perhaps you could make it to "/quotes/category/:category” and eliminate the redirect?
I love this page haha 👍
I can't use the search form and button to get a list of quotes for a different topic.
Still some console logs knocking around
In the form.hbs the category selector is repeated twice. this element could be a partial that you re-use e.g. categorySelector.hbs
(I'm not sure if you can abstract the whole select component or perhaps just the options it has but can try it out)
Also I think this file could be turned into two separate forms as it is one form for creating a quote and one form for searching them but they are in the same file. (the second form currently doesn't work and might be easier to implement if you turn it into it's own form)
<form class="quote-form" autocomplete="off" action="/submitquote" method="post">
<label for="category">Category</label>
<select class="category" name="category" id="category" required>
<option value="food">Food</option>
<option value="meetups">Meet-ups</option>
<option value="movies">Movies</option>
<option value="coding">Coding</option>
<option value="random">Random</option>
</select>
<br>
<label for="quote"> Quote</label>
<textarea type="text" name="quote" class="quote" id="quote" required></textarea>
<br>
<label for="author"> Author</label>
<input type="text" name="author" class="author" id="author" required>
<br>
<label for="keyword"> Keyword</label>
<input type="text" name="keyword" class="keyword" id="keyword" required>
<br>
<input type="submit" value="Submit" class="submit_button">
</form>
<label> Search By Category
<select class="category" name="category" id="categorySearch" required>
<option value="food">Food</option>
<option value="meetups">Meet-ups</option>
<option value="movies">Movies</option>
<option value="coding">Coding</option>
<option value="random">Random</option>
</select>
<input type="button" id="categoryButton" value="Search" />
</label>
Great job writing route tests! If you have time to add some db tests, you might want to create a separate db_build_test.sql
build script to run them from. You can add drop and create tables to your heart's content without losing all the pearls of wisdom from your production db.
You have an image logo that we can't see. If you don't use it, it might be interesting to take it out as it lower your pourcentage of accessibility (no inside)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.