Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

171: Better Templates, Pages Examples and Structure #235

Merged
merged 24 commits into from
Jun 1, 2018

Conversation

evanmwillhite
Copy link
Contributor

Fixes #171

Changes:

  • Builds default site header and footer implementations for Pattern Lab
  • Consolidates into a single default twig template for layout markup (can be tweaked or duplicated and changed per project)
  • Fleshes out templates (low fidelity) and pages (high fidelity) for homepage and article.
  • Provides data for both of those as well as internal links to highlight Pattern Lab's linking functionality for prototyping
  • Consolidates layout styles into a single file
  • Adds fake render filter for PL components
  • Bonus: removes PL's generic styles for the main section and gives them a PL-specific class

Copy link
Contributor

@ModulesUnraveled ModulesUnraveled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with it. If you're good with my changes, go ahead and merge. I'll approve so that you can when you're ready.

@@ -1,878 +0,0 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this file in a few components for default content (forms, tabs)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I looked through the "All" page, and didn't see anything. Oh, well. I had contemplated leaving it in for the "example-ness" of them anyway. So I'll revert that commit.

@@ -13,6 +13,7 @@
</a>
<nav id="main-nav" class="main-nav">
{% include "@molecules/menus/_menu.twig" with {
menu_class: 'main-menu'
menu_class: "main-menu",
items: menu_items,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a change in templates/navigation/menu--main.html.twig to:

{% include "@molecules/menus/main-menu/main-menu.twig" with {
  menu_items: items,
} %}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@@ -0,0 +1,12 @@
{% embed "@templates/_default.twig" with {
menu_items: header.menu_items,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this for the example pages, but I think it's confusing for the template/wireframe ones to link to the pages. I'd rather see their menu items be: Full Width | With Sidebar and link to the correct templates. You?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me too. I had also thought about that. But decided not to just because it would take more time. But if you think it'll be confusing, I'll add another menu set for templates.

@evanmwillhite
Copy link
Contributor Author

See my comments. This is shaping up awesome. Great call on the placeholder for templates. I'd be surprised if we didn't quickly adopt that for all projects moving forward.

@evanmwillhite
Copy link
Contributor Author

Looks great! If you're happy with my small change, 🚢 it!

@ModulesUnraveled
Copy link
Contributor

Good catch! Meant to do that, but was trying to work too fast...

@ModulesUnraveled ModulesUnraveled merged commit 30d76f2 into develop Jun 1, 2018
@ModulesUnraveled ModulesUnraveled deleted the 171-templates-pages branch June 1, 2018 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants