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 theme based frontend configuration #711

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

ericchiang
Copy link
Contributor

This PR reworks the web layout so static files can be provided and
a "themes" directory to allow a certain degree of control over logos,
styles, etc.

This PR does NOT add general support for frontend customization,
only enough to allow us to start exploring theming internally.
The dex binary also must now be run from the root directory since
templates are no longer "compiled into" the binary.

The docker image has been updated with frontend assets.

@ericchiang
Copy link
Contributor Author

cc @rithujohn191 @amrutac

Tested the docker image with:

make docker-image
sudo docker run -p 5556:5556 -d \
    -v $PWD/examples/config-dev.yaml:/examples/config-dev.yaml |
    quay.io/coreos/dex:$( ./scripts/git-version ) |
    serve /examples/config-dev.yaml
./bin/example-app

Dir string

// Defaults to "( issuer URL )/theme/logo.png"
LogoURL string
Copy link
Contributor

Choose a reason for hiding this comment

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

Just realized that I need a fav icon url as well. Any chance you can add a FavIconURL as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here's the default one.
favicon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow up PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plus we want to either put the fav icon URL on the connector or derive it from the ID, so it'll probably take a different implementation.

@ericchiang
Copy link
Contributor Author

per irl conversation with @amrutac we're going to punt on the fav icon. @rithujohn191 want to take a quick look?

Copy link
Contributor

@rithujohn191 rithujohn191 left a comment

Choose a reason for hiding this comment

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

Everything looks good. Just a small suggestion about adding a comment.

return nil
}

func loadWebConfig(c webConfig) (static, theme http.Handler, templates *templates, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a brief comment for this function would be helpful? Just clarifying the default behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, will do

@amrutac
Copy link
Contributor

amrutac commented Dec 1, 2016

Thanks for getting this done so quickly! 👍

This PR reworks the web layout so static files can be provided and
a "themes" directory to allow a certain degree of control over logos,
styles, etc.

This PR does NOT add general support for frontend customization,
only enough to allow us to start exploring theming internally.
The dex binary also must now be run from the root directory since
templates are no longer "compiled into" the binary.

The docker image has been updated with frontend assets.
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

Successfully merging this pull request may close these issues.

3 participants