From fc058095f14c6f275c327ef6effd7fe843a719b5 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 23 Aug 2016 16:31:37 +0100 Subject: [PATCH] #534 improved login background customisation - now login background can be defined via property - readme updates --- ng2-components/ng2-alfresco-login/README.md | 16 +++++++----- .../src/assets/images/background.svg | 25 +++++++++++++++++++ .../components/alfresco-login.component.css | 3 ++- .../components/alfresco-login.component.html | 3 ++- .../components/alfresco-login.component.ts | 3 +++ 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 ng2-components/ng2-alfresco-login/src/assets/images/background.svg diff --git a/ng2-components/ng2-alfresco-login/README.md b/ng2-components/ng2-alfresco-login/README.md index b4f29c7d05..a28b703fb8 100644 --- a/ng2-components/ng2-alfresco-login/README.md +++ b/ng2-components/ng2-alfresco-login/README.md @@ -159,13 +159,8 @@ You can also specify ECM and BPM, in this case both system components It is possible changing logo and background images to custom values. ```html - - ``` @@ -174,6 +169,15 @@ Should give you something like the following: ![custom login](assets/custom-login.png) +Alternatively you can bind to your component properties and provide values dynamically if needed: + +```html + + +``` + ## Build from sources Alternatively you can build component from sources with the following commands: diff --git a/ng2-components/ng2-alfresco-login/src/assets/images/background.svg b/ng2-components/ng2-alfresco-login/src/assets/images/background.svg new file mode 100644 index 0000000000..26c1066351 --- /dev/null +++ b/ng2-components/ng2-alfresco-login/src/assets/images/background.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.css b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.css index b24960efbe..e9eeb5e1ee 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.css +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.css @@ -22,7 +22,8 @@ } :host .content-layout { - background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF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0KCQk8ZGVmcz4NCgkJCTxyZWN0IGlkPSJTVkdJRF8zXyIgd2lkdGg9IjEyODAiIGhlaWdodD0iMTI4MCIvPg0KCQk8L2RlZnM+DQoJCTxjbGlwUGF0aCBpZD0iU1ZHSURfNF8iPg0KCQkJPHVzZSB4bGluazpocmVmPSIjU1ZHSURfM18iICBvdmVyZmxvdz0idmlzaWJsZSIvPg0KCQk8L2NsaXBQYXRoPg0KCQk8ZyBjbGlwLXBhdGg9InVybCgjU1ZHSURfNF8pIj4NCgkJCTxjaXJjbGUgb3BhY2l0eT0iMC44IiBmaWxsPSIjOEJDMzRBIiBjeD0iOCIgY3k9IjMxMzYiIHI9IjI1NjAiLz4NCgkJCTxjaXJjbGUgb3BhY2l0eT0iMC42IiBmaWxsPSIjMDNBOUY0IiBjeD0iMjA0OCIgY3k9IjEwMjQiIHI9IjEyODAiLz4NCgkJCTxjaXJjbGUgb3BhY2l0eT0iMC44IiBmaWxsPSIjRkY5ODAwIiBjeD0iMCIgY3k9Ii0xMjgiIHI9Ijk2MCIvPg0KCQkJPGNpcmNsZSBvcGFjaXR5PSIwLjMiIGZpbGw9IiNGRkQ2MDAiIGN4PSItMTkyIiBjeT0iNjQwIiByPSI2NDAiLz4NCgkJPC9nPg0KCTwvZz4NCjwvZz4NCjxnIGlkPSJMYXllcl8yIiBkaXNwbGF5PSJub25lIj4NCjwvZz4NCjwvc3ZnPg0K') center / cover; + background-size: cover; + background-position: center; height: 100%; padding: 0; } diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html index b07416631d..59ac37d1e3 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html @@ -1,4 +1,5 @@ -