diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2b8a1808b96103a17c5d33ffb5cfca6f0dd82a56..6dc1f2843292b711eafb41c640116a12da20bb57 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,7 +20,6 @@ import { SignupComponent } from './signup/signup.component'; import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { LOCALE_ID } from '@angular/core'; - import { NavButtonComponent } from './header/nav-button/nav-button.component'; // Firebase @@ -58,6 +57,7 @@ import { GeocodeService } from './services/geocode.service'; import { ResetpasswordComponent } from './resetpassword/resetpassword.component'; import { ThankyouComponent } from './thankyou/thankyou.component'; import { ClickOutsideDirective } from './directives/click-outside.directive'; +import { EuropeanDatePipe } from './community/european-date.pipe'; @NgModule({ @@ -75,7 +75,8 @@ import { ClickOutsideDirective } from './directives/click-outside.directive'; SignupComponent, ClickOutsideDirective, ResetpasswordComponent, - ThankyouComponent + ThankyouComponent, + EuropeanDatePipe ], imports: [ BrowserModule, diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 4bb3ed2dfd41bd589c898eeb353cb1514a20d596..639041a376f76d486e3b7b9a0407f3c64d0bb15a 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -16,7 +16,7 @@
{{ user }}
- {{time | date:"yyyy-MM-dd"}} + {{time | europeanDate}}

{{ message }}

diff --git a/src/app/community/european-date.pipe.spec.ts b/src/app/community/european-date.pipe.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..e122e0bb2891b16518aa4eb00e516cc808133f5b --- /dev/null +++ b/src/app/community/european-date.pipe.spec.ts @@ -0,0 +1,8 @@ +import { EuropeanDatePipe } from './european-date.pipe'; + +describe('EuropeanDatePipe', () => { + it('create an instance', () => { + const pipe = new EuropeanDatePipe(); + expect(pipe).toBeTruthy(); + }); +}); diff --git a/src/app/community/european-date.pipe.ts b/src/app/community/european-date.pipe.ts new file mode 100644 index 0000000000000000000000000000000000000000..55c405a7060281835127257d962f68c4e67ce915 --- /dev/null +++ b/src/app/community/european-date.pipe.ts @@ -0,0 +1,16 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { LangService } from '../services/lang.service'; + +@Pipe({ + name: 'europeanDate' +}) +export class EuropeanDatePipe implements PipeTransform { + constructor(private lang: LangService) { } + + transform(value: any, pattern: string = 'yyyy-MM-dd'): any { + const datePipe: DatePipe = new DatePipe(this.lang.browserLang); + return datePipe.transform(value, pattern); + } + +} diff --git a/src/app/header/header.component.css b/src/app/header/header.component.css index d00643877a9661a50b0e2b21a23e3f237e93f4ef..486fc49115430c447ac220b8af7391daadc5c6d2 100644 --- a/src/app/header/header.component.css +++ b/src/app/header/header.component.css @@ -10,6 +10,10 @@ background-color: #8C93D8; } +#logo { + padding-top: 20px; +} + .nav__list { list-style: none; margin: 0; @@ -92,4 +96,4 @@ option { .logo-center { margin: auto; -} \ No newline at end of file +} diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index 17e1b7a24efada0abe100047ac25b59dbb56b293..ccfeed21754b42fb7c081e431a3b1cbf7fa21806 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -1,6 +1,6 @@ - \ No newline at end of file + diff --git a/src/app/login/login.component.css b/src/app/login/login.component.css index eaf88920e46155ba0499174b75ada92f16913b57..bcde91846f5e20e55d7c1078993190c6b71bada0 100644 --- a/src/app/login/login.component.css +++ b/src/app/login/login.component.css @@ -7,6 +7,12 @@ background-position: bottom; } +.row { + display: flex; + text-align: center; + justify-content: center; +} + form { text-align: center; min-width: 300px; @@ -20,42 +26,36 @@ form { display: flex; flex-direction: column; justify-content: center; - margin-left: 50%; - margin-top: 5%; + margin-top: 40px; +} + +.form-container { + display: flex; + margin: 0 auto; } h2{ padding-bottom: 5%; - font-family: Montserrat; font-weight: 500; font-size: 36px; line-height: 44px; - display: flex; - margin-left: 34%; - margin-top: 10%; - + color: #2E3192; font-style: normal; } -.form-group{ +.form-group { padding-top: 2%; - margin-left: 5%; - margin-right: 5%; + margin: 0 5%; text-align: left; } -input[type=text] { +input { background: #FFFFFF; border: 1px solid #EBDDFF; box-sizing: border-box; -} - -input[type=password] { - background: #FFFFFF; - box-sizing: border-box; - border: 1px solid #EBDDFF; + width: 100%; } #line { @@ -66,7 +66,7 @@ input[type=password] { margin-bottom: 15%; } -.label{ +.label { font-family: Montserrat; font-weight: normal; font-size: 22px; @@ -74,12 +74,12 @@ input[type=password] { display: flex; align-items: center; text-align: center; - + color: #2E3192; font-style: normal; } -input::placeholder{ +input::placeholder { font-family: Montserrat; font-weight: normal; font-size: 22px; @@ -87,23 +87,15 @@ input::placeholder{ display: flex; align-items: left; text-align: left; - + color: #999FDE; font-style: normal; } -button{ +button { background: #EBDDFF; box-sizing: border-box; border-radius: 30px; - font-family: Montserrat; - font-style: normal; - font-weight: normal; - font-size: 24px; - line-height: 29px; - display: flex; - align-items: center; - text-align: center; border: 2px solid #2E3192; font-family: Montserrat; @@ -116,10 +108,9 @@ button{ color: #2E3192; font-style: normal; - margin-left: 25%; - margin-right: 25%; + margin: 0 auto; + padding: 1% 6%; margin-top: 10%; - } #rectangle { @@ -128,13 +119,21 @@ button{ background: red; } +.form-action { + padding-top: 2%; + margin: 0 5%; + width: 90%; + display: flex; + flex-direction: column; + justify-content: space-evenly; + text-align: center; +} #sos{ - font-family: Montserrat; font-weight: normal; font-size: 23.1579px; line-height: 28px; - display: flex; + display: inline-block; align-items: center; text-align: center; font-style: normal; @@ -143,35 +142,41 @@ button{ border: 1px solid #FF9848; border-radius: 28.9474px; box-sizing: border-box; - margin-left: 30%; - padding-top: 2%; - + padding: 2%; + margin-top: 2%; } +.content { + display: flex; + flex-direction: column; + justify-content: space-evenly; +} -p{ - font-family: Montserrat; + +p { font-weight: normal; font-size: 22px; line-height: 27px; - display: flex; align-items: center; text-align: center; - + color: #2E3192; font-style: normal; } -a{ - font-family: Montserrat; +a { font-weight: normal; font-size: 22px; line-height: 27px; - display: flex; align-items: center; text-align: center; text-decoration-line: underline; - + color: #FC5C14; font-style: normal; -} \ No newline at end of file +} + +#sos > a { + display: inline-block; + padding: 0px 2px; +} diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index cc373c4163a75f889afc3215e02d5265c35c496e..240efb75010a67610e0a06cbda4f7f8c88587c30 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -1,9 +1,10 @@
-
-
Are you in an emergency ? Call 147 or find help near you
-
-

Login

+
+
Are you in an emergency ? Call 147 or find help near you
+
+ +

NAV.LOGIN

@@ -21,12 +22,15 @@ formControlName="password" placeholder="Enter password">
- Forgot password? - -

Don't have an account yet?

- Sign Up +
+ Forgot password? + +

LOGIN.NOACCOUNT

+ Sign Up +

{{ errorMessage }}

+
@@ -59,11 +63,11 @@
Forgot password? - + - +

LOGIN.NOACCOUNT

Sign Up ---> \ No newline at end of file +--> diff --git a/src/app/maps/maps.component.css b/src/app/maps/maps.component.css index 258a0856163687f989df2c1f438eaf0a1ae87414..5151363a6eb1fd826a9ecff68f9b1f543e7a5454 100644 --- a/src/app/maps/maps.component.css +++ b/src/app/maps/maps.component.css @@ -1,9 +1,47 @@ -.my-4{ - margin-top:70px !important; + +:host { + overflow-x: hidden; +} +.back{ + height: 100vh; + max-height: 100%; + width: calc(100vw - 20rem - 6%); + align-content: center; + padding: 0 3%; + justify-content: center; +} + +.select-container, .details-container { + display: flex; + max-width: calc(100vw - 26rem); + display: flex; + flex-direction: column; + justify-content: space-between; + padding: .5em 0; + overflow-x: hidden; + margin: 0 auto; +} + +.map-container { + max-width: calc(100vw - 26rem); + margin: 0 auto; + overflow-x: hidden; +} + +.details-container { + overflow-y: scroll; + overflow-x: hidden; +} + +.custom-select { + width: 70%; } agm-map { - height: 50vh; + height: 50vh; + max-width: calc(100vw - 20rem); + padding: 0 3%; + margin: 0 auto; } .target { @@ -17,8 +55,8 @@ agm-map { } .content-header { - background-color: gray; - padding: 20px 0px 10px 0px; + background-color: lightcoral; + padding: 10px; align-items: middle; font-size: 18pt; } @@ -26,12 +64,13 @@ agm-map { .content-grid { display: grid; grid-template-columns: repeat(3, 1fr); + background-color: whitesmoke; } .content-grid > * { padding: 5px; - background-color: whitesmoke; border-radius: 5px; + border: 1px solid lightslategray; } .content-grid > * > p { diff --git a/src/app/maps/maps.component.html b/src/app/maps/maps.component.html index f4b77a25c244556dc37b2906c846fff60c8763fb..c4469a227bc32923632456fed14ba9508a3945fe 100644 --- a/src/app/maps/maps.component.html +++ b/src/app/maps/maps.component.html @@ -1,13 +1,16 @@ -
- - - -

{{ 'MAP.CANTONOF' | translate }} {{cantonSelected}}

- + +

{{ 'MAP.CANTONOF' | translate }} {{cantonSelected}}

+

MAP.SORRY

- + +
+ {{ place.address }}
{{ place.postalCode }}
{{ place.city }}
- MAP.WEBSITE
- {{ place.tel }}
- MAP.WEBSITE
+ MAP.WEBSITE
{{ place.tel }}
{{ 'MAP.WHO' | translate }} : {{ place.type }}
-
+ +
-
-

{{t.key}}

-

MAP.UNCATEGORIZED

-
-
-

- {{d.name}}
- {{d.address}}
- {{d.postalCode}} {{ d.city }}
- {{ d.tel }}
- MAP.WEBSITE
- {{ d.tel }}
- MAP.WEBSITE
- {{ 'MAP.DESCRIPTION' | translate }} : {{ d.description }}
-

+
+
+

{{t.key}}

+

MAP.UNCATEGORIZED

+
+
+

+ {{d.name}}
+ {{d.address}}
+ {{d.postalCode}} {{ d.city }}
+ {{ d.tel }}
+ MAP.WEBSITE
+ {{ 'MAP.DESCRIPTION' | translate }} : {{ d.description }}
+

+
-
\ No newline at end of file +
diff --git a/src/app/signup/signup.component.css b/src/app/signup/signup.component.css index 3114d0881de9a52c9b866cfb3d3b6f2801efb059..c33fb98f775ee7e6718bb1a370c048d302d91c8d 100644 --- a/src/app/signup/signup.component.css +++ b/src/app/signup/signup.component.css @@ -7,11 +7,17 @@ background-position: bottom; } +.row { + display: flex; + text-align: center; + justify-content: center; +} + form { text-align: center; - min-width: 300px; - max-width: 400px; - min-height: 600px; + min-width: 400px; + max-width: 600px; + min-height: 500px; max-height: 700px; background: #FFFFFF; box-sizing: border-box; @@ -20,44 +26,39 @@ form { display: flex; flex-direction: column; justify-content: center; - margin-left: 50%; - margin-top: 5%; + margin-top: 40px; +} +.content { + display: flex; + flex-direction: column; + justify-content: space-evenly; +} +.form-container { + display: flex; + margin: 0 auto; } -h2{ +h2 { padding-bottom: 5%; - font-family: Montserrat; font-weight: 500; font-size: 36px; line-height: 44px; - display: flex; - margin-left: 34%; - margin-top: 10%; - - + color: #2E3192; font-style: normal; } - - -.form-group{ +.form-group { padding-top: 2%; - margin-left: 5%; - margin-right: 5%; + margin: 0 5%; text-align: left; } -input[type=text] { - background: #FFFFFF; - border: 1px solid #EBDDFF; - box-sizing: border-box; -} - -input[type=password] { +input { background: #FFFFFF; box-sizing: border-box; border: 1px solid #EBDDFF; + width: 100%; } #line { @@ -68,44 +69,34 @@ input[type=password] { margin-bottom: 15%; } -label{ - font-family: Montserrat; +label { font-weight: normal; font-size: 22px; line-height: 27px; display: flex; align-items: center; text-align: center; - + color: #2E3192; font-style: normal; } -input::placeholder{ - font-family: Montserrat; +input::placeholder { font-weight: normal; font-size: 22px; line-height: 27px; display: flex; align-items: left; text-align: left; - + color: #999FDE; font-style: normal; } -button{ +button { background: #EBDDFF; box-sizing: border-box; border-radius: 30px; - font-family: Montserrat; - font-style: normal; - font-weight: normal; - font-size: 24px; - line-height: 29px; - display: flex; - align-items: center; - text-align: center; border: 2px solid #2E3192; font-family: Montserrat; @@ -118,10 +109,9 @@ button{ color: #2E3192; font-style: normal; - margin-left: 25%; - margin-right: 25%; + margin: 0 auto; + padding: 1% 6%; margin-top: 10%; - } #rectangle { @@ -132,11 +122,10 @@ button{ #sos{ - font-family: Montserrat; font-weight: normal; font-size: 23.1579px; line-height: 28px; - display: flex; + display: inline-block; align-items: center; text-align: center; font-style: normal; @@ -145,13 +134,37 @@ button{ border: 1px solid #FF9848; border-radius: 28.9474px; box-sizing: border-box; - margin-left: 30%; - padding-top: 2%; - + padding: 2%; + margin-top: 2%; } +a { + font-weight: normal; + font-size: 22px; + line-height: 27px; + align-items: center; + text-align: center; + text-decoration-line: underline; + + color: #FC5C14; + font-style: normal; +} +.form-action { + padding-top: 2%; + margin: 0 5%; + width: 90%; + display: flex; + flex-direction: column; + justify-content: space-evenly; + text-align: center; +} + +#sos > a { + display: inline-block; + padding: 0px 2px; +} diff --git a/src/app/signup/signup.component.html b/src/app/signup/signup.component.html index 5ae46fe85fcf8caf11f13e9b07dbadab95952e74..702fd429d6bf4bc0f318622e2157fc39a4eae353 100644 --- a/src/app/signup/signup.component.html +++ b/src/app/signup/signup.component.html @@ -1,33 +1,33 @@
- -
-
-
Are you in an emergency ? Call 147 or find help near you
-
-

Sign up

-
-
- - -
-
- - -
- -
-

{{ errorMessage }}

-
+
+
+
Are you in an emergency ? Call 147 or find help near you
+
+
+

Sign up

+
+
+ + +
+
+ + +
+ +
+

{{ errorMessage }}

+
- +
@@ -37,7 +37,7 @@ - \ No newline at end of file +--> diff --git a/src/assets/favicon.png b/src/assets/favicon.png deleted file mode 100644 index 6b9b992058e4e1ae3b5ee4c58c4fc1ff59fdb508..0000000000000000000000000000000000000000 Binary files a/src/assets/favicon.png and /dev/null differ diff --git a/src/assets/favicon.svg b/src/assets/favicon.svg new file mode 100644 index 0000000000000000000000000000000000000000..9c80f0826cb5aaf355ffe65ddf890937c5febddc --- /dev/null +++ b/src/assets/favicon.svg @@ -0,0 +1 @@ +