Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equal height cards to wd_s #213

Closed
gregrickaby opened this issue Nov 4, 2016 · 9 comments
Closed

Add equal height cards to wd_s #213

gregrickaby opened this issue Nov 4, 2016 · 9 comments
Assignees

Comments

@gregrickaby
Copy link
Contributor

This is on every project. Let's just bake it in.

@gregrickaby
Copy link
Contributor Author

Use the HTML markup from http://refills.bourbon.io/ cards and HTML5 it!

@allisonplus allisonplus self-assigned this Nov 4, 2016
@allisonplus
Copy link
Contributor

allisonplus commented Nov 4, 2016

Branch: https://github.com/WebDevStudios/wd_s/tree/feature/cards-equal-height

Created template tag _s_get_card_ that gets called within _s_get_card_loop (within extras.php).
Basic stylings living within /modules/_card.scss

(Co-created with Jo and Carrie.) Would be interested to hear any thoughts about naming, organization, etc. Heads up that this is using the template-tags file BEFORE the phpcs branch(es).

Screenshot is when you use:
<?php echo _s_get_card_loop( array( 'num_cards' => '3', 'num_post' => 6 ) ); ?>

screen shot 2016-11-04-cards

@colorful-tones
Copy link
Contributor

One suggestion I have is changing the naming convention to "cards" since that is what this feature is: cards. So _s_get_card_loop would be _s_get_cards_loop and Sass partial _card.scss would be _cards.scss and any other places that are pertinent.

If I were to hop in to a project and hadn't known anything about this and needed to apply styling to the cards. When perusing the Sass folders for the appropriate partial, and saw _card.scss I would assume that the partial is just for an individual card's styling, and not for all cards.

Just a thought.

@jomurgel jomurgel self-assigned this Dec 14, 2016
@carrieforde
Copy link
Contributor

Having worked a lot more with cards and all that jazz, I'd love to see this broken out a bit further so it's more extensible:

  1. Generalize the get_cards (I don't * think * we need loop in the name) function so that allows us to pass in an array of arguments, which might include post_type, posts_per_page, category_name, etc., as well as a template_part (which basically specifies which template part to pull).
  2. Move the markup for the card to a folder/file within /template-parts/. I'd love to see /template-parts/cards/ as a directory. Then, in the get_cards function, you can call get_template_part( $args['template_part'] ). This allows us to grab whatever flavor of markup we want with on query function. :D

@carrieforde
Copy link
Contributor

I'd love to see this as a PR to the WDS Components Library. Perhaps we could extend it to be a more general "cards" component with different layouts and styles? 😄

@allisonplus allisonplus removed their assignment Feb 23, 2017
@gregrickaby
Copy link
Contributor Author

I think it's safe to say, this needs to be simplified. The initial goal was to have equal height card styles, be a "solved problem" out of the box. I recommend we just start by adding equal height sass.

@carrieforde
Copy link
Contributor

I'd personally prefer to see fewer things "baked-in" that need to be removed, and instead have these WordPress-ready styles available as drop-ins via the WDS Components Library.

Near the end of a project, it's not always easy to remember, "did we actually use this?" making it increasingly difficult to remove unused code--I'd say adding code is easier than removing it. Just my 2 cents. 😄

@gregrickaby
Copy link
Contributor Author

I agree @carrieforde. As things are added to https://github.com/WebDevStudios/WDS-Components-Library they could be removed from wd_s.

@gregrickaby
Copy link
Contributor Author

Funny how our projects ebb and flow...we haven't seen an equal height card, since this issue was opened.

Everyone OK with just closing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants