-
Notifications
You must be signed in to change notification settings - Fork 67
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 optional logo setting #75
Comments
This function within Pattern Lab core is most directly responsible for outputting JSON available to the front end. https://github.com/pattern-lab/patternlab-node/blob/master/core/lib/ui_builder.js#L570 You will notice a couple objects in there that may look familiar to you, such as This function takes If you added logoImage onto I think what we could do is put logoImage inside an object called I can hack that together pretty quick, and {
"theme" : {
"logoImage" : "path/to/image.jpg" //which may have to be creatively relative, btw
...
}
} The nice thing about wrapping it into something like this is that I can pass the whole thing and reasonable future proof it for you. |
that work for you @bradfrost ? |
@bradfrost ⬇️ https://github.com/pattern-lab/patternlab-node/releases/tag/v2.12.0 Happy Hacktoberfest! |
Thanks @bmuenzenmeyer! I think that
All of the default values for the above object come first, as this is what is the current PL setup. Most of the other theme parameters I've either started on or have completed. And for the |
Cool. It would be great if theme supported a custom CSS file like
https://github.com/bmuenzenmeyer/plugin-node-uiextension does, which made
adding custom states easy.
…On Sun, Oct 1, 2017, 7:25 AM Brad Frost ***@***.***> wrote:
Thanks @bmuenzenmeyer <https://github.com/bmuenzenmeyer>! I think that
theme object is exactly what we're looking for. Here's just a few things
I'm thinking for that object:
{
"theme" : {
"logoImage" : false | "path/to/file",
"color" : "dark" | "light" | [future color themes],
"density" : "compact" | "cozy" | "comfortable",
"layout" : "horizontal" | "vertical",
"mode" : "workshop" | "storefront"
}
}
All of the default values for the above object come first, as this is what
is the current PL setup. Most of the other theme parameters I've either
started on or have completed. And for the mode part, the thought is to be
able to use PL as both a workshop and a storefront
<http://bradfrost.com/blog/post/the-workshop-and-the-storefront/>, so it
can be used by the working team to build the design system, and then
elegantly serve as a styleguide at the same time. It would be cool to be
able to build simultaneously to two different places with each mode
selected.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASNwxCLJrwmNDiddHAzrWSlkYhHeurWks5sn4SdgaJpZM4PpvrV>
.
|
We should also plan to write this up when we are a bit more solid in the
spec repo
On Sun, Oct 1, 2017, 8:22 AM Brian Muenzenmeyer <
brian.muenzenmeyer@gmail.com> wrote:
… Cool. It would be great if theme supported a custom CSS file like
https://github.com/bmuenzenmeyer/plugin-node-uiextension does, which
made adding custom states easy.
On Sun, Oct 1, 2017, 7:25 AM Brad Frost ***@***.***> wrote:
> Thanks @bmuenzenmeyer <https://github.com/bmuenzenmeyer>! I think that
> theme object is exactly what we're looking for. Here's just a few things
> I'm thinking for that object:
>
> {
> "theme" : {
> "logoImage" : false | "path/to/file",
> "color" : "dark" | "light" | [future color themes],
> "density" : "compact" | "cozy" | "comfortable",
> "layout" : "horizontal" | "vertical",
> "mode" : "workshop" | "storefront"
> }
> }
>
> All of the default values for the above object come first, as this is
> what is the current PL setup. Most of the other theme parameters I've
> either started on or have completed. And for the mode part, the thought
> is to be able to use PL as both a workshop and a storefront
> <http://bradfrost.com/blog/post/the-workshop-and-the-storefront/>, so it
> can be used by the working team to build the design system, and then
> elegantly serve as a styleguide at the same time. It would be cool to be
> able to build simultaneously to two different places with each mode
> selected.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#75 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AASNwxCLJrwmNDiddHAzrWSlkYhHeurWks5sn4SdgaJpZM4PpvrV>
> .
>
|
Realized I left that off in my original post; added it in an edit 20
seconds after!
|
Is this still a thing? I tried it with the new Node 3.0 version, but it does not work. The PL logo is still present. :) Thanks!
|
@sghoweri I know name is... I'm trying to recall what new stuff has cooked up |
Closed via pattern-lab/patternlab-node#1078 |
Have the ability to add a company's logo to the Pattern Lab interface. I already have the style and markup in place; I just need to know how to make it a variable inside of
patternlab-config.json
(which maybe @bmuenzenmeyer could walk me through?).I'm thinking something like this in the markup:
and this in
patternlab-config.json
:Understanding how config variables work in general would help me with all the theming stuff I'm doing.
The text was updated successfully, but these errors were encountered: