Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit a755a8f

Browse files
Sam HSam H
authored andcommitted
fix: resolve merge conflicts with develop
2 parents e27c5ac + 4758291 commit a755a8f

File tree

9 files changed

+113
-161
lines changed

9 files changed

+113
-161
lines changed

src/components/app-nav-header/app-nav-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export class AppNavHeader {
7070
</div>
7171
</li>
7272
<li class="nav-item dropdown" data-target="#navbarSupportedContent">
73-
<a class="nav-link dropdown-toggle" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
73+
<a class="nav-link dropdown-toggle" id="navbarDropdown1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
7474
{translate('nav.links.about')}
7575
</a>
76-
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
76+
<div class="dropdown-menu" aria-labelledby="navbarDropdown1">
7777
<stencil-route-link url="/about" anchorClass="nav-link dropdown-item" activeClass="active">
7878
Meet the team
7979
</stencil-route-link>

src/pages/app-about/app-about.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare var fbq;
1010
export class AppAbout {
1111
@Prop({ context: 'isServer' })
1212
private isServer: boolean;
13-
private className = localStorage.getItem('allowWebp') === 'true' ? 'webp' : 'hero';
13+
// private className = localStorage.getItem('allowWebp') === 'true' ? 'webp' : 'hero';
1414

1515
public images: any;
1616

@@ -223,7 +223,7 @@ export class AppAbout {
223223
return (
224224
<div class="about">
225225
{/* header - hero */}
226-
<header class={this.className}>
226+
<header>
227227
<div class="container">
228228
<div class="row align-items-center">
229229
<div class="col-md-8 col-sm-10 text-container">
@@ -242,7 +242,7 @@ export class AppAbout {
242242
</header>
243243

244244
{/* section - team */}
245-
<section id="team-photo" class="team-photo">
245+
<section id="team-photo" class="team-photo {this.className}">
246246
<div class="container">
247247
<div class="row align-items-end text-center">
248248
<div class="col-12">

src/pages/app-case-study/app-case-study.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class AppCaseStudy {
6464
JuntoScope
6565
</a>{' '}
6666
is to help teams determine scopes for tasks in{' '}
67-
<a href="https://www.teamwork.com/partner/gqfq4mb55o" target="_blank">
67+
<a href="https://www.teamwork.com/partner/gqfq4mb55o" target="_blank" rel="noopener">
6868
Teamwork.com
6969
</a>
7070
© Projects more accurately, quickly, and efficiently to keep projects within budget and on time. Integrating with Teamwork Projects API, teams will be able to:
@@ -181,7 +181,7 @@ export class AppCaseStudy {
181181
<br />
182182
<br />
183183
As our team came close to launching{' '}
184-
<a href="http://try.juntoscope.com" target="_blank">
184+
<a href="http://try.juntoscope.com" target="_blank" rel="noopener">
185185
JuntoScope
186186
</a>
187187
, we learned from Teamwork.com that they were changing the way their API worked and this forced us to go back to our design and development teams to work in the new authentication flows.

src/pages/app-contact/app-contact.tsx

Lines changed: 26 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -68,43 +68,26 @@ export class AppContact {
6868
switch (e.name) {
6969
case 'name':
7070
this.formValues.nameValid = e.checkValidity();
71-
this.nameError = this.formValues.nameValid
72-
? ''
73-
: (this.nameError = e.validationMessage);
71+
this.nameError = this.formValues.nameValid ? '' : (this.nameError = e.validationMessage);
7472
break;
7573

7674
case 'email':
7775
this.formValues.emailValid = e.checkValidity();
78-
this.emailError = this.formValues.emailValid
79-
? ''
80-
: (this.emailError = e.validationMessage);
76+
this.emailError = this.formValues.emailValid ? '' : (this.emailError = e.validationMessage);
8177
break;
8278

8379
case 'phone':
84-
this.formValues.phoneValid = e.value.match(
85-
/^[\+]?[(]?\d{1,3}[)]?([-\s\.]?\d{3}){1,2}[-\s\.]?\d{4,6}$/
86-
);
87-
this.phoneError = this.formValues.phoneValid
88-
? ''
89-
: (this.phoneError =
90-
e.validationMessage ||
91-
'Phone number invalid. Please try a valid format.');
80+
this.formValues.phoneValid = e.value.match(/^[\+]?[(]?\d{1,3}[)]?([-\s\.]?\d{3}){1,2}[-\s\.]?\d{4,6}$/);
81+
this.phoneError = this.formValues.phoneValid ? '' : (this.phoneError = e.validationMessage || 'Phone number invalid. Please try a valid format.');
9282
break;
9383

9484
case 'message':
9585
this.formValues.messageValid = e.checkValidity();
96-
this.messageError = this.formValues.messageValid
97-
? ''
98-
: (this.messageError = e.validationMessage);
86+
this.messageError = this.formValues.messageValid ? '' : (this.messageError = e.validationMessage);
9987
break;
10088
}
10189

102-
this.formValues.nameValid &&
103-
this.formValues.emailValid &&
104-
this.formValues.phoneValid &&
105-
this.formValues.messageValid
106-
? (this.isDisabled = false)
107-
: (this.isDisabled = true);
90+
this.formValues.nameValid && this.formValues.emailValid && this.formValues.phoneValid && this.formValues.messageValid ? (this.isDisabled = false) : (this.isDisabled = true);
10891
}
10992

11093
async handleSubmit(event) {
@@ -114,17 +97,14 @@ export class AppContact {
11497
this.formSubmitting = true;
11598
this.isDisabled = true;
11699

117-
await fetch(
118-
'https://5fq97p31pc.execute-api.us-east-1.amazonaws.com/prod/openforgeContactUs',
119-
{
120-
method: 'post',
121-
mode: 'no-cors',
122-
headers: {
123-
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
124-
},
125-
body: JSON.stringify(this.formValues),
126-
}
127-
);
100+
await fetch('https://5fq97p31pc.execute-api.us-east-1.amazonaws.com/prod/openforgeContactUs', {
101+
method: 'post',
102+
mode: 'no-cors',
103+
headers: {
104+
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
105+
},
106+
body: JSON.stringify(this.formValues),
107+
});
128108

129109
// isServer is false when running in the browser
130110
// and true when being prerendered
@@ -152,8 +132,7 @@ export class AppContact {
152132
form.scrollIntoView({ block: 'start', behavior: 'smooth' });
153133
}
154134

155-
private className =
156-
localStorage.getItem('isSafari') === 'false' ? 'webp' : 'hero';
135+
private className = localStorage.getItem('allowWebp') === 'false' ? 'webp' : 'hero';
157136

158137
render() {
159138
return (
@@ -169,10 +148,7 @@ export class AppContact {
169148
<p>
170149
<app-translate key="contact.hero.request" />
171150
</p>
172-
<button
173-
onClick={this.scrollToForm.bind(this)}
174-
class="btn btn-primary"
175-
>
151+
<button onClick={this.scrollToForm.bind(this)} class="btn btn-primary">
176152
<app-translate key="contact.hero.requestNow" />
177153
</button>
178154
</div>
@@ -190,100 +166,40 @@ export class AppContact {
190166
<p class="lead">
191167
<app-translate key="contact.form.text" />
192168
</p>
193-
<form
194-
id="contact-form"
195-
onSubmit={this.handleSubmit.bind(this)}
196-
novalidate={true}
197-
>
198-
<app-input
199-
name="name"
200-
label={translate('contact.form.fullName')}
201-
type="text"
202-
id="name"
203-
placeholder=""
204-
required={true}
205-
/>
169+
<form id="contact-form" onSubmit={this.handleSubmit.bind(this)} novalidate={true}>
170+
<app-input name="name" label={translate('contact.form.fullName')} type="text" id="name" placeholder="" required={true} />
206171
<p class="error">
207-
<span
208-
style={
209-
!this.nameError
210-
? { display: 'none' }
211-
: this.errorIconStyles
212-
}
213-
>
172+
<span style={!this.nameError ? { display: 'none' } : this.errorIconStyles}>
214173
<i class="fa fa-exclamation-circle" aria-hidden="true" />
215174
</span>
216175
{this.nameError}
217176
</p>
218177

219-
<app-input
220-
name="email"
221-
label={translate('contact.form.email')}
222-
type="email"
223-
id="email"
224-
placeholder=""
225-
required={true}
226-
/>
178+
<app-input name="email" label={translate('contact.form.email')} type="email" id="email" placeholder="" required={true} />
227179
<p class="error">
228-
<span
229-
style={
230-
!this.emailError
231-
? { display: 'none' }
232-
: this.errorIconStyles
233-
}
234-
>
180+
<span style={!this.emailError ? { display: 'none' } : this.errorIconStyles}>
235181
<i class="fa fa-exclamation-circle" aria-hidden="true" />
236182
</span>
237183
{this.emailError}
238184
</p>
239185

240-
<app-input
241-
name="phone"
242-
label={translate('contact.form.phone')}
243-
id="phone"
244-
type="tel"
245-
placeholder=""
246-
required={true}
247-
/>
186+
<app-input name="phone" label={translate('contact.form.phone')} id="phone" type="tel" placeholder="" required={true} />
248187
<p class="error">
249-
<span
250-
style={
251-
!this.phoneError
252-
? { display: 'none' }
253-
: this.errorIconStyles
254-
}
255-
>
188+
<span style={!this.phoneError ? { display: 'none' } : this.errorIconStyles}>
256189
<i class="fa fa-exclamation-circle" aria-hidden="true" />
257190
</span>
258191
{this.phoneError}
259192
</p>
260193

261-
<app-input
262-
name="message"
263-
label={translate('contact.form.whereDidYouHear')}
264-
type="text"
265-
placeholder=""
266-
required={true}
267-
/>
194+
<app-input name="message" label={translate('contact.form.whereDidYouHear')} type="text" placeholder="" required={true} />
268195
<p class="error">
269-
<span
270-
style={
271-
!this.messageError
272-
? { display: 'none' }
273-
: this.errorIconStyles
274-
}
275-
>
196+
<span style={!this.messageError ? { display: 'none' } : this.errorIconStyles}>
276197
<i class="fa fa-exclamation-circle" aria-hidden="true" />
277198
</span>
278199
{this.messageError}
279200
</p>
280201

281-
<button
282-
name="submit"
283-
type="submit"
284-
class="btn btn-primary"
285-
disabled={this.isDisabled}
286-
>
202+
<button name="submit" type="submit" class="btn btn-primary" disabled={this.isDisabled}>
287203
<app-translate key="contact.form.button.send" />
288204
</button>
289205
</form>

src/pages/app-detailed-service/app-detailed-service.tsx

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { MatchResults, RouterHistory } from '@stencil/router';
33

44
import { translate } from '../../services/translation.service';
55

6+
/* tslint:disable-next-line */
7+
import $ from 'jquery';
8+
69
declare var fbq;
710

811
@Component({
@@ -95,6 +98,39 @@ export class AppDetailedService {
9598
this.resetFormValues();
9699

97100
this.changeMetadata();
101+
102+
/* tslint:disable-next-line */
103+
$(window).on('scroll resize', function() {
104+
if ($('#content-panel-inner-detail') && $('#content-panel-inner-detail').offset()) {
105+
const pos = $('#content-panel-inner-detail').offset().top + $('#content-panel-inner-detail').height();
106+
let done = false;
107+
$('.content-panel').each(function() {
108+
if (!done && pos <= Math.floor($(this).offset().top + $(this).height())) {
109+
const newDescr = $(this)
110+
.find('.description')
111+
.html();
112+
113+
$('#content-panel-inner-detail').html(newDescr);
114+
115+
done = true;
116+
}
117+
});
118+
119+
if (
120+
$('#content-panel-inner-detail').offset().top ===
121+
$('.content-panel')
122+
.first()
123+
.offset().top
124+
) {
125+
const newDescr = $('.content-panel')
126+
.first()
127+
.find('.description')
128+
.html();
129+
130+
$('#content-panel-inner-detail').html(newDescr);
131+
}
132+
}
133+
});
98134
}
99135

100136
validateField(e) {
@@ -300,10 +336,15 @@ export class AppDetailedService {
300336
<section id="example" class="example">
301337
<div class="main-content">
302338
<div class="sidebar">
303-
<div class="sidebar__inner content-panel-inner" id="content-panel-inner" />
339+
<div class="sidebar__inner content-panel-inner" id="content-panel-inner-detail" />
304340
</div>
305341
<div class="content">
306-
<div class="content-panel" style={{ 'background-image': `url(${this.imgs[this.match.params.service].exampleBackground})` }}>
342+
<div
343+
class="content-panel"
344+
style={{
345+
'background-image': `url(${this.imgs[this.match.params.service].exampleBackground})`,
346+
}}
347+
>
307348
<div class="content-panel-inner description">
308349
<div class="panel-inner-text">
309350
<h2>{translate(`services.${this.match.params.service}.example.title`)}</h2>
@@ -314,12 +355,12 @@ export class AppDetailedService {
314355
<h2>{translate(`services.${this.match.params.service}.example.name`)}</h2>
315356
<div class="row store-buttons">
316357
<div class="col-6 text-right">
317-
<a href="https://itunes.apple.com/us/app/the-voyage-by-new-ocean-health/id779637437?mt=8" target="_blank">
358+
<a href="https://itunes.apple.com/us/app/the-voyage-by-new-ocean-health/id779637437?mt=8" target="_blank" rel="noopener">
318359
<app-img src="/assets/graphic-apple-appstore.png" alt="Apple AppStore Logo" />
319360
</a>
320361
</div>
321362
<div class="col-6 text-left">
322-
<a href="https://play.google.com/store/apps/details?id=com.carecaminnovations.mobile" target="_blank">
363+
<a href="https://play.google.com/store/apps/details?id=com.carecaminnovations.mobile" target="_blank" rel="noopener">
323364
<app-img src="/assets/graphic-google-googleplaystore.png" alt="Google Play Store logo" />
324365
</a>
325366
</div>

src/pages/app-home/app-home.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@
294294

295295
.phone-image {
296296
height: 440px;
297+
@include media-breakpoint-down(sm) {
298+
height: auto;
299+
}
297300
}
298301
}
299302

0 commit comments

Comments
 (0)