✨ Add LoginCard layout component#23
Merged
Merged
Conversation
Closes #19. Mutualises the centered-card-on-coloured-background markup recurring across Enabel apps (login, forgot password, reset password, etc.). Provides a fullscreen wrapper (theme colour or background image), a Bootstrap card with optional logo + title, and a {% block content %} for the form. Card width is configurable through a sm/md/lg/xl preset (360/480/640/800 px).
Member
Author
|
Smoke-tested in Impala — rendered four variants + invalid-size sanity check. What I verified
Two small docs nudges (optional)
LGTM, ready to tag. |
Member
Author
|
Both nudges addressed in 753d513:
Ready for re-check / merge. |
Member
Author
|
Re-checked after
Component code unchanged since the previous smoke, so no need to re-run. Ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LoginCardcomponent to mutualise the centered-card-on-coloured-background markup recurring across Enabel apps (login, forgot password, reset password, external-login confirmation, etc.)background) or a cover image (backgroundImage)shadow-lgandborder-radius: 1rem, optional centered logo (max-height 80 px) andh1.h3titlesizepreset:sm(360 px) /md(480 px, default) /lg(640 px) /xl(800 px){% block content %}API
All parameters optional with sensible defaults:
logo?stringnulltitle?stringnullbackgroundstring'primary'backgroundImage?stringnullsizestring'md'Strict validation:
backgroundrestricted to the 8 Bootstrap theme colours,sizeto the 4 presets.Modal variant
The issue mentioned this should also be usable inside a Bootstrap modal. Rather than complicating the API with a
fullscreenflag, the doc explains the template-override path — copytemplates/layout/login_card.html.twiginto the project'stemplates/bundles/EnabelUx/, drop the outermin-vh-100wrapper, done. Easy to revisit if a consumer pushes back.Test plan
backgroundImagevariantCloses #19.