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

Displaying theme object inside of PL files #103

Open
bradfrost opened this issue Jan 8, 2018 · 9 comments
Open

Displaying theme object inside of PL files #103

bradfrost opened this issue Jan 8, 2018 · 9 comments

Comments

@bradfrost
Copy link
Member

@bmuenzenmeyer @EvanLovely:

This is likely a Very Dumb Question from Brad, but here it goes: I see that the theme object is available in the browser (if I open the console and type theme it returns the object); how do I get the info within theme to display in, say, html/partials/header.html?

I know we are using Hogan to render our templates, but I'm scratching my head why adding {{ theme.logoImage }} isn't printing out the path to the logo.

Forgive the dumbness of the question, but once I have an idea of how to work with the theme object in this repo, I can get everything wired up!

@bmuenzenmeyer
Copy link
Member

@bradfrost It's not a dumb question at all.

Take a look at the commit above on the theme-in-header branch - the partial was not being processed as a Hogan template, like some of its siblings were. It was only being included using the code here: https://github.com/pattern-lab/styleguidekit-assets-default/blob/develop/gulpfile.js#L59

Anyway, I committed it with obviously poor UX of actually displaying the theme content.

Make changes as you see fit, run gulp --copy-dist=../../../public and you are on your way.

Feel free to continue working off of this branch if you like.

Aside

I also see that you are starting work inside feature-themes, but you should really be branching off of develop per the guidelines, otherwise we will be diverging from all that work like last time.

image

@bradfrost
Copy link
Member Author

@bmuenzenmeyer Thanks a ton for this! This all makes sense to me.

I also see that you are starting work inside feature-themes, but you should really be branching off of develop per the guidelines, otherwise we will be diverging from all that work like last time.

Forgive me, I still feel like I'm all thumbs with this process. Can I just work in theme-in-header for now for this stuff?

@bmuenzenmeyer
Copy link
Member

You betcha.

@bradfrost
Copy link
Member Author

Cool, thanks @bmuenzenmeyer. I've committed changes here: 1b9b4a0

Any way you could give a quick glance and a thumbs up just to see if I'm not screwing things up? With so many branches and stuff swirling around, I'm still struggling to get my head around where I should be doing work. Sorry for being dumb!

@bmuenzenmeyer
Copy link
Member

@bradfrost 👍

@bradfrost
Copy link
Member Author

Awesome thanks!

@bradfrost
Copy link
Member Author

Alright, I may have closed this too soon. Next thing I need to do is to get stuff inside the iframe listening to the config. Is that possible/easy?

@bradfrost bradfrost reopened this Jan 10, 2018
@bmuenzenmeyer
Copy link
Member

as in, individual patterns?

@bradfrost
Copy link
Member Author

As in, inside the viewall template and individual patterns. Basically anything that's inside the iframe.

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

2 participants