Closed JessJodoin closed 4 years ago
You need to connect js/main.js
into your default.html
layout using a <script>
tag.
Lots of classes to add!
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/products.html#L19
• unit-content-distribute
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/_patterns/cards/product-cards.html#L1
• unit-content-distribute
& content-fill
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/_patterns/cards/product-cards.html#L2
• content-fill
For the categories, how is that supposed to work? I’m not sure what you’re trying to do.
When using the for
loop you can limit how many times it runs with limit:3
(or whatever number)
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/index.html#L11
{% for product in site.products limit:3 %}
products
with an "s"—only this line (matching how the folder is spelled).Hey @thomasjbradley
more questions... are you surprised lol
okay!
I’m trying to make the product filters background fill all the way to the footer so it’s a black bar all the way down but what I’ve tired hasn’t worked because of the page links at the bottom. Is there a way to do that (no worries if not)
When I click stuff shows up now (yay!) but it’s not populating them with my .md files data
also I’m getting this: [2020-04-16 09:17:27] ERROR `/images/images/bb-yoda-t-1.jpg' not found. Regenerating: 1 file(s) changed at 2020-04-16 09:17:42 _patterns/sections/recommened-section.html ...done in 0.341889 seconds.
not sure why it’s adding a second /images
My ‘recommended product section’ is ignoring the unit content distribute and content fill for some reason (? not sure why)
For the categories, you know on clothing website where they have those cards that link to a page for all mens or all womens products, that's what I'm going for. I was just struggling because for them I need specific cards and not one for every .md file in my _products. So what I was wondering was should I make another folder and call it something like _categories and create specific .md files for the category card information and then link it under 'fields' like I did in all the config.yml files (also if I do that would I have to link it in the _config.yml like for the products one?)
Looking at the way your code is set up, not I don’t think it would work. Unless you move the page links into the same unit as the product list.
Change all these to data=page
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/_layouts/product.html#L6
Not sure where the image problem is on your site…
I think you need .unit-content-distribute
here too:
https://github.com/JessJodoin/ecommerce-pattern-library/blob/master/index.html#L12
Yes. That’s the perfect idea. Make a new collection named _categories
. *Don’t forget to add the information in _config.yml
—the main, root, config to make the collection work.
@thomasjbradley Oh also, when I fix the include tags for the category cards should I pick a different name (?) or is 'data' before the name of the include fine? what I mean is the {{include.data.title}} Is that fine? I'm wondering cause I used that for the products so should I call it something else?
@thomasjbradley
Also also (so sorry)
In the /_patterns/cards/config.yml under 'source', what should I put?
In the _config.yml , do I write: collections: categories: output: true defaults:
"site.categories[0]"
Yes. For the scope, you’ll want to make a new layout called like category.html
that will show only the products from that specific category.
Hey @thomasjbradley
I'm not quite sure what I'm supposed to put inside the new category.html layout and how to put that inside at the bottom my index.html page
Also for the surprise pages are we allowed to add existing classes to style the content?
:shipit:
Hey @thomasjbradley
okay so more things I'm struggling with (lol)
I placed my product filters code into my product list page and for whatever reason it’s not opening when I click it and it’s not staying open at the larger sizes but in my pattern library it works perfectly fine.
I having issues making my product cards all the same size
I’m not sure how I should go about making my category cards work, should I be making other .md files for those specifically? And should they be in their own folder similar to the _products?
I’m also struggling with making only a certain number of cards populate in the pages. (in particular my category cards because I only want 6 specific cards, but also for the new cards on the main page)
Also also nothing shows up when I click on my cards, it navigates to a blank page