-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add swift sign in/register component (#780)
* Add sign in md + component files * add user icon * style sign in component * add sign in link Co-authored-by: Catia Costa <34938764+catiarodriguescosta@users.noreply.github.com> * update sign in link * amend variable color Co-authored-by: Catia Costa <34938764+catiarodriguescosta@users.noreply.github.com>
- Loading branch information
1 parent
5f50d2c
commit 7ef0890
Showing
8 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% raw %} | ||
{% from "wmnds/components/sign-in/_sign-in.njk" import wmndsSignIn %} | ||
{{ wmndsSignIn() }} | ||
{% endraw %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% macro wmndsSignIn(params) %} | ||
|
||
{% from "wmnds/components/icon/_icon.njk" import wmndsIcon %} | ||
|
||
<nav class="wmnds-sign-in"> | ||
<div class="wmnds-container"> | ||
<div class="wmnds-grid wmnds-grid--justify-end"> | ||
<div class="wmnds-col-auto"> | ||
<a href="https://my.swiftcard.org.uk" class="wmnds-sign-in__link"> | ||
{{ | ||
wmndsIcon({ | ||
icon: 'swift-bird-icon', | ||
class: 'wmnds-btn__icon' | ||
}) | ||
}} | ||
Sign in or register | ||
{{ | ||
wmndsIcon({ | ||
icon: 'general-user', | ||
class: 'wmnds-btn__icon wmnds-m-l-sm' | ||
}) | ||
}} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
{% endmacro %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.wmnds-sign-in { | ||
padding: $size-sm 0; | ||
color: $white; | ||
background-color: get-color(primary, 50, dark); | ||
|
||
&__link { | ||
color: $white; | ||
font-family: $x-heading-font-family; | ||
font-weight: 700; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,9 @@ | |
{ | ||
"name": "Phase indicator" | ||
}, | ||
{ | ||
"name": "Sign in" | ||
}, | ||
{ | ||
"name": "Table" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% extends "www/_layouts/layout-left-pane.njk" %} | ||
{% set pageTitle="Sign in or register" %} | ||
|
||
{% block content %} | ||
|
||
{% markdown %} | ||
|
||
{# About #} | ||
|
||
## About | ||
|
||
{# What #} | ||
|
||
### What does it do? | ||
|
||
- Links to Unicard registration and account log in page | ||
|
||
{# When #} | ||
|
||
### When to use it? | ||
|
||
- On Swift content pages only. | ||
|
||
### When not to use it? | ||
|
||
- On other Transport for West Midlands content pages | ||
|
||
### How it works | ||
|
||
- Banner appears at the top of the page, above global navigation banner and links to Unicard registration and account log in page | ||
|
||
{% endmarkdown %} | ||
|
||
{% from "wmnds/components/sign-in/_sign-in.njk" import wmndsSignIn %} | ||
{% from "www/_partials/component-example/component-example.njk" import compExample %} | ||
|
||
{{ | ||
compExample([ | ||
wmndsSignIn() | ||
], { | ||
componentPath: "wmnds/components/sign-in/", | ||
njk: true, | ||
js: false, | ||
iframe: false | ||
}) | ||
}} | ||
|
||
{% endblock %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"sync", | ||
"ticket", | ||
"trash", | ||
"user", | ||
"wallet", | ||
"warning-circle", | ||
"warning-triangle" | ||
|