Skip to content

Commit 4fa9df5

Browse files
author
Pedro Fernandes Steimbruch
committedApr 26, 2016
Refs #17474 implementing rapid contact
1 parent 586d815 commit 4fa9df5

18 files changed

+8161
-6273
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
use Phinx\Migration\AbstractMigration;
4+
5+
class CreateContacts extends AbstractMigration
6+
{
7+
/**
8+
* Change Method.
9+
*
10+
* Write your reversible migrations using this method.
11+
*
12+
* More information on writing migrations is available here:
13+
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
14+
*
15+
* The following commands can be used in this method and Phinx will
16+
* automatically reverse them when rolling back:
17+
*
18+
* createTable
19+
* renameTable
20+
* addColumn
21+
* renameColumn
22+
* addIndex
23+
* addForeignKey
24+
*
25+
* Remember to call "create()" or "update()" and NOT "save()" when working
26+
* with the Table class.
27+
*/
28+
public function change()
29+
{
30+
$this->table('contacts')
31+
->addColumn('subject', 'string', ['limit' => 255, 'default' => null, 'null' => false])
32+
->addColumn('name', 'string', ['limit' => 255, 'default' => null, 'null' => false])
33+
->addColumn('email', 'string', ['limit' => 255, 'default' => null, 'null' => false])
34+
->addColumn('body', 'text', ['default' => null, 'null' => false])
35+
->addColumn('created', 'timestamp')
36+
->addColumn('modified', 'timestamp')
37+
->create();
38+
}
39+
}

‎config/asset_compress.ini

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ files[] = plugins/bootstrap/css/bootstrap.min.css
1919
files[] = plugins/elegant_font/html_css/style.css
2020
files[] = plugins/rs-plugin/css/settings.css
2121
files[] = plugins/owl-carousel/owl.carousel.css
22+
files[] = css/intl.tel.min.css
2223
files[] = css/style.css
2324
files[] = css/responsive.css
2425
files[] = css/custom.css
@@ -32,8 +33,10 @@ files[] = plugins/stellar.min.js
3233
files[] = plugins/sticky.min.js
3334
files[] = plugins/owl-carousel/owl.carousel.min.js
3435
files[] = plugins/nav/down.js
36+
files[] = js/intl.tel.min.js
3537
files[] = js/script.js
3638
files[] = js/youtube_videos.js
39+
files[] = js/support.js
3740

3841
[not_compiled.js]
3942
files[] = plugins/rs-plugin/js/jquery.themepunch.tools.min.js

‎config/site.php

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
return [
44
'Site' => [
5+
'contact' => [
6+
'email' => 'contact@cakedc.com'
7+
],
58
'quotes' => [
69
[
710
'image' => 'quote/janey.png',

‎src/Controller/ContactsController.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
namespace App\Controller;
3+
4+
use Cake\Core\Configure;
5+
use Cake\Mailer\Email;
6+
7+
class ContactsController extends AppController
8+
{
9+
public function rapid()
10+
{
11+
$this->autoRender = false;
12+
13+
$contact = $this->Contacts->createRapidContact($this->request->data);
14+
15+
if ($this->Contacts->save($contact)) {
16+
$this->sendEmail($contact);
17+
return;
18+
}
19+
20+
$this->response->statusCode(422);
21+
}
22+
23+
private function sendEmail($contact)
24+
{
25+
$email = new Email('default');
26+
27+
$email
28+
->emailFormat('text')
29+
->replyTo($contact->email, $contact->name)
30+
->from([Configure::read('Site.contact.email') => 'CakeDC Website'])
31+
->to(Configure::read('Site.contact.email'))
32+
->subject($contact->subject)
33+
->send($contact->body);
34+
}
35+
}

‎src/Model/Entity/Contact.php

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
namespace App\Model\Entity;
3+
4+
use Cake\ORM\Entity;
5+
6+
/**
7+
* Contact Entity.
8+
*
9+
* @property int $id
10+
* @property string $subject
11+
* @property string $name
12+
* @property string $email
13+
* @property string $body
14+
* @property \Cake\I18n\Time $created
15+
* @property \Cake\I18n\Time $modified
16+
*/
17+
class Contact extends Entity
18+
{
19+
20+
/**
21+
* Fields that can be mass assigned using newEntity() or patchEntity().
22+
*
23+
* Note that when '*' is set to true, this allows all unspecified fields to
24+
* be mass assigned. For security purposes, it is advised to set '*' to false
25+
* (or remove it), and explicitly make individual fields accessible as needed.
26+
*
27+
* @var array
28+
*/
29+
protected $_accessible = [
30+
'*' => true,
31+
'id' => false,
32+
];
33+
}

‎src/Model/Table/ContactsTable.php

+158
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<?php
2+
namespace App\Model\Table;
3+
4+
use App\Model\Entity\Contact;
5+
use Cake\ORM\Query;
6+
use Cake\ORM\RulesChecker;
7+
use Cake\ORM\Table;
8+
use Cake\Validation\Validator;
9+
10+
/**
11+
* Contacts Model
12+
*
13+
*/
14+
class ContactsTable extends Table
15+
{
16+
17+
/**
18+
* Initialize method
19+
*
20+
* @param array $config The configuration for the Table.
21+
* @return void
22+
*/
23+
public function initialize(array $config)
24+
{
25+
parent::initialize($config);
26+
27+
$this->table('contacts');
28+
$this->displayField('name');
29+
$this->primaryKey('id');
30+
31+
$this->addBehavior('Timestamp');
32+
}
33+
34+
/**
35+
* Default validation rules.
36+
*
37+
* @param \Cake\Validation\Validator $validator Validator instance.
38+
* @return \Cake\Validation\Validator
39+
*/
40+
public function validationDefault(Validator $validator)
41+
{
42+
$validator
43+
->integer('id')
44+
->allowEmpty('id', 'create');
45+
46+
$validator
47+
->requirePresence('subject', 'create')
48+
->notEmpty('subject');
49+
50+
$validator
51+
->requirePresence('name', 'create')
52+
->notEmpty('name');
53+
54+
$validator
55+
->email('email')
56+
->requirePresence('email', 'create')
57+
->notEmpty('email');
58+
59+
$validator
60+
->requirePresence('body', 'create')
61+
->notEmpty('body');
62+
63+
return $validator;
64+
}
65+
66+
/**
67+
* Returns a rules checker object that will be used for validating
68+
* application integrity.
69+
*
70+
* @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
71+
* @return \Cake\ORM\RulesChecker
72+
*/
73+
public function buildRules(RulesChecker $rules)
74+
{
75+
return $rules;
76+
}
77+
78+
/**
79+
* Generates a rapid contact from data
80+
*
81+
* @return Contact
82+
*/
83+
public function createRapidContact($data)
84+
{
85+
$contact = $this->newEntity();
86+
$contact->set('name', $data['name']);
87+
$contact->set('email', $data['email']);
88+
$contact->set('subject', $this->extractRapidSubject($data));
89+
$contact->set('body', $this->extractRapidBody($data));
90+
91+
return $contact;
92+
}
93+
94+
/**
95+
* Extracts the right body for rapid contact based on data
96+
*
97+
* @param array $data
98+
* @return string
99+
*/
100+
private function extractRapidBody($data)
101+
{
102+
$intro = 'Hi, my name is ' . $data['name'] . '. Please ';
103+
$body = '';
104+
105+
switch ($data['type']) {
106+
case 'email':
107+
$body = 'email me at ' . $data['email'];
108+
break;
109+
case 'call':
110+
$body = 'call me on ' . $data['phone'];
111+
break;
112+
case 'skype':
113+
$body = 'skype me at ' . $data['skype'];
114+
break;
115+
default:
116+
throw new \InvalidArgumentException();
117+
}
118+
119+
return $intro . $body . '. Thanks.';
120+
}
121+
122+
/**
123+
* Extracs the right subject for rapid contact based on data
124+
*
125+
* @param array $data
126+
* @return string
127+
*/
128+
private function extractRapidSubject($data)
129+
{
130+
$subject = '';
131+
switch ($data['subject']) {
132+
case 'other':
133+
$subject = 'Rapid Response';
134+
break;
135+
case 'dev':
136+
$subject = 'Rapid Response: Development';
137+
break;
138+
case 'consultancy':
139+
$subject = 'Rapid Response: Consultancy';
140+
break;
141+
case 'review':
142+
$subject = 'Rapid Response: Code Review';
143+
break;
144+
case 'migration':
145+
$subject = 'Rapid Response: Migration';
146+
break;
147+
case 'training':
148+
$subject = 'Rapid Response: Training';
149+
break;
150+
default:
151+
throw new \InvalidArgumentException();
152+
}
153+
154+
$subject .= " ({$data['name']} / {$data['email']})";
155+
156+
return $subject;
157+
}
158+
}

‎src/Template/Element/home/support.ctp

+142-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
<span class="glyph_range icon-expertise">O</span>
3434
</div>
3535
<p><?= __('Request a rapid response from us now, and we\'ll contact you within 24 hours:')?></p>
36+
<p class="rapid-contact-feedback"></p>
3637
<div class="text-center">
37-
<?= $this->Html->link(__('Rapid Response'), 'http://www.cakedc.com/contact', ['class' => 'btn btn-expertise mt20'])?>
38+
<?= $this->Html->link(__('Rapid Response'), 'javascript:;', [
39+
'class' => 'btn btn-expertise mt20',
40+
'data-toggle' => 'modal',
41+
'data-target' => '#rapidresponse'
42+
])?>
3843
</div>
3944
</div>
4045
<div class="col-md-6 col-md-offset-1">
@@ -75,3 +80,139 @@
7580
</div>
7681
</div>
7782
</section>
83+
84+
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel" id="rapidresponse">
85+
<div class="modal-dialog" role="document">
86+
<div class="modal-content modal-showcase">
87+
<?= $this->Form->create(null, ['url' => [
88+
'controller' => 'contacts',
89+
'action' => 'rapid'
90+
], 'class' => 'support-form']); ?>
91+
<div class="modal-header">
92+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
93+
<span aria-hidden="true">&times;</span>
94+
</button>
95+
</div>
96+
97+
<div class="modal-body">
98+
<div class="row">
99+
<div class="col-md-12">
100+
<div class="col-sm-4 icon-modal-show">
101+
<span class="glyph_range">P</span>
102+
</div>
103+
<div class="col-sm-8 t-modal-show">
104+
<h4><strong><?= __('Rapid') ?></strong></h4>
105+
<h4><?= __('Response') ?></h4>
106+
<p><?= __('Request a rapid response from us now, and we\'ll contact you within <strong>24 hours!</strong>') ?></p>
107+
</div>
108+
</div>
109+
<div class="col-md-12">
110+
<div class="form-group">
111+
<label class="col-sm-2 control-label-rapid"><?= __('Name') ?></label>
112+
<div class="col-sm-10">
113+
<?= $this->Form->input('name', [
114+
'label' => false,
115+
'div' => false,
116+
'class' => 'form-control form-plugin-rapid',
117+
'placeholder' => 'Name',
118+
'required' => true
119+
]) ?>
120+
</div>
121+
</div>
122+
123+
<div class="form-group">
124+
<label class="col-sm-2 control-label-rapid"><?= __('Email') ?></label>
125+
<div class="col-sm-10">
126+
<?= $this->Form->input('email', [
127+
'label' => false,
128+
'div' => false,
129+
'class' => 'form-control form-plugin-rapid',
130+
'placeholder' => 'Email',
131+
'required' => true
132+
]) ?>
133+
</div>
134+
</div>
135+
136+
<div class="form-group">
137+
<label class="col-sm-2 control-label-rapid"><?= __('Type') ?></label>
138+
<div class="col-sm-10">
139+
<?= $this->Form->input('type', [
140+
'div' => false,
141+
'label' => false,
142+
'class' => 'form-plugin-rapid type-select',
143+
'type' => 'select',
144+
'options' => [
145+
'email' => 'Email me',
146+
'call' => 'Call me',
147+
'skype' => 'Skype me'
148+
],
149+
'templates' => [
150+
'inputContainer' => '{{content}}'
151+
]
152+
]) ?>
153+
</div>
154+
</div>
155+
156+
<div class="form-group phone-field hidden-fields" style="display:none">
157+
<label class="col-sm-2 control-label-rapid"><?= __('Phone') ?></label>
158+
<div class="col-sm-10">
159+
<?= $this->Form->input('phone', [
160+
'div' => false,
161+
'label' => false,
162+
'class' => 'form-plugin-rapid form-control',
163+
'id' => 'intl-phone-number'
164+
]) ?>
165+
</div>
166+
</div>
167+
168+
<div class="form-group skype-field hidden-fields" style="display:none">
169+
<label class="col-sm-2 control-label-rapid"><?= __('Skype') ?></label>
170+
<div class="col-sm-10">
171+
<?= $this->Form->input('skype', [
172+
'div' => false,
173+
'label' => false,
174+
'class' => 'form-plugin-rapid form-control',
175+
]) ?>
176+
</div>
177+
</div>
178+
179+
<div class="form-group">
180+
<label class="col-sm-2 control-label-rapid"><?= __('Subject') ?></label>
181+
<div class="col-sm-10">
182+
<?= $this->Form->input('subject', [
183+
'div' => false,
184+
'label' => false,
185+
'class' => 'form-plugin-rapid',
186+
'type' => 'select',
187+
'options' => [
188+
'other' => "Let's talk",
189+
'dev' => 'Development',
190+
'consultancy' => 'Consultancy',
191+
'review' => 'Code Review',
192+
'migration' => 'Migration',
193+
'training' => 'Training'
194+
],
195+
'templates' => [
196+
'inputContainer' => '{{content}}'
197+
]
198+
]) ?>
199+
</div>
200+
</div>
201+
</div>
202+
</div>
203+
</div>
204+
205+
<div class="modal-footer back-modal-footer-show">
206+
<div class="col-xs-6 icon-dc-modal">
207+
<span class="glyph_range">O</span>
208+
</div>
209+
<div class="col-xs-6">
210+
<?= $this->Form->submit('Send', [
211+
'class' => 'btn btn-primary btn-modal-show'
212+
]) ?>
213+
</div>
214+
</div>
215+
<?= $this->Form->end(); ?>
216+
</div>
217+
</div>
218+
</div>

‎tests/Fixture/ContactsFixture.php

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
namespace App\Test\Fixture;
3+
4+
use Cake\TestSuite\Fixture\TestFixture;
5+
6+
/**
7+
* ContactsFixture
8+
*
9+
*/
10+
class ContactsFixture extends TestFixture
11+
{
12+
13+
/**
14+
* Fields
15+
*
16+
* @var array
17+
*/
18+
// @codingStandardsIgnoreStart
19+
public $fields = [
20+
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
21+
'subject' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
22+
'name' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
23+
'email' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
24+
'body' => ['type' => 'text', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
25+
'created' => ['type' => 'timestamp', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
26+
'modified' => ['type' => 'timestamp', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
27+
'_constraints' => [
28+
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
29+
],
30+
'_options' => [
31+
'engine' => 'InnoDB',
32+
'collation' => 'utf8_general_ci'
33+
],
34+
];
35+
// @codingStandardsIgnoreEnd
36+
37+
/**
38+
* Records
39+
*
40+
* @var array
41+
*/
42+
public $records = [
43+
[
44+
'id' => 1,
45+
'subject' => 'Lorem ipsum dolor sit amet',
46+
'name' => 'Lorem ipsum dolor sit amet',
47+
'email' => 'Lorem ipsum dolor sit amet',
48+
'body' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
49+
'created' => 1461695452,
50+
'modified' => 1461695452
51+
],
52+
];
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
namespace App\Test\TestCase\Model\Table;
3+
4+
use App\Model\Table\ContactsTable;
5+
use Cake\ORM\TableRegistry;
6+
use Cake\TestSuite\TestCase;
7+
8+
/**
9+
* App\Model\Table\ContactsTable Test Case
10+
*/
11+
class ContactsTableTest extends TestCase
12+
{
13+
14+
/**
15+
* Test subject
16+
*
17+
* @var \App\Model\Table\ContactsTable
18+
*/
19+
public $Contacts;
20+
21+
/**
22+
* Fixtures
23+
*
24+
* @var array
25+
*/
26+
public $fixtures = [
27+
'app.contacts'
28+
];
29+
30+
/**
31+
* setUp method
32+
*
33+
* @return void
34+
*/
35+
public function setUp()
36+
{
37+
parent::setUp();
38+
$config = TableRegistry::exists('Contacts') ? [] : ['className' => 'App\Model\Table\ContactsTable'];
39+
$this->Contacts = TableRegistry::get('Contacts', $config);
40+
}
41+
42+
/**
43+
* tearDown method
44+
*
45+
* @return void
46+
*/
47+
public function tearDown()
48+
{
49+
unset($this->Contacts);
50+
51+
parent::tearDown();
52+
}
53+
54+
/**
55+
* Test initialize method
56+
*
57+
* @return void
58+
*/
59+
public function testInitialize()
60+
{
61+
$this->markTestIncomplete('Not implemented yet.');
62+
}
63+
64+
/**
65+
* Test validationDefault method
66+
*
67+
* @return void
68+
*/
69+
public function testValidationDefault()
70+
{
71+
$this->markTestIncomplete('Not implemented yet.');
72+
}
73+
74+
/**
75+
* Test buildRules method
76+
*
77+
* @return void
78+
*/
79+
public function testBuildRules()
80+
{
81+
$this->markTestIncomplete('Not implemented yet.');
82+
}
83+
}

‎webroot/css/custom.css

+9
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ input[type="radio"]:checked:before {
8282
text-transform: none;
8383
text-align: left;
8484
}
85+
86+
.intl-tel-input {
87+
width: 100% !important;
88+
}
89+
.rapid-contact-feedback {
90+
padding:10px;
91+
text-align: center;
92+
border-radius: 5px;
93+
}

‎webroot/css/intl.tel.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎webroot/css/responsive.css

+280
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@
267267
bottom: 0;
268268
}
269269

270+
#slideout-2 {
271+
bottom: 0;
272+
}
273+
274+
#slideout_inner-2 {
275+
bottom: 0;
276+
}
277+
270278
/* ---------------------- VIDEOS ------------------------- */
271279

272280
#videos-full {
@@ -353,6 +361,42 @@
353361
margin-bottom: 20px;
354362
}
355363

364+
.icon-modal-show {
365+
margin-bottom: 40px;
366+
margin-top: 20px;
367+
}
368+
369+
.icon-modal-show span {
370+
font-size: 140px;
371+
}
372+
373+
.t-modal-show h4 {
374+
text-align: center;
375+
font-size: 50px;
376+
margin-bottom: 20px;
377+
}
378+
379+
.t-modal-show span {
380+
text-align: center;
381+
}
382+
383+
.t-modal-show p {
384+
text-align: center;
385+
}
386+
387+
.control-label-rapid {
388+
padding-left: 15px;
389+
}
390+
391+
.form-plugin-rapid {
392+
margin-bottom: 0;
393+
}
394+
395+
.icon-dc-modal span {
396+
font-size: 40px;
397+
}
398+
399+
356400
/* ---------------------- CALENDAR ------------------------- */
357401

358402
.title-calendar h1 {
@@ -379,6 +423,150 @@
379423
padding-top: 120px;
380424
}
381425

426+
.icon-getinvolved {
427+
display: block;
428+
margin-top: 30px;
429+
font-size: 110px;
430+
}
431+
432+
/* ---------------------- CERTIFICATION ------------------------- */
433+
434+
.certification h2 {
435+
line-height: 45px;
436+
}
437+
438+
.certification h3 {
439+
line-height: 35px;
440+
}
441+
442+
.box-certification {
443+
margin-bottom: 60px;
444+
}
445+
446+
/* ---------------------- MY PHP ------------------------- */
447+
448+
.icon-social-mycake {
449+
margin-top: 110px;
450+
}
451+
452+
.mycake-login h4 {
453+
line-height: 40px;
454+
}
455+
456+
.title-mycake span {
457+
font-size: 80px;
458+
display: block;
459+
margin-top: 50px;
460+
}
461+
462+
.mycake-username h4 {
463+
margin-top: 60px;
464+
}
465+
466+
.mycake-profile img {
467+
width: 100%;
468+
}
469+
470+
.mycake-edit h6 {
471+
margin-top: 60px;
472+
}
473+
474+
.icon-privacy {
475+
display: block;
476+
margin-top: 25px;
477+
}
478+
479+
.title-mycake h1 {
480+
line-height: 50px;
481+
}
482+
483+
484+
/* ---------------------- TRADEMARKS ------------------------- */
485+
486+
487+
.t-circle-trade {
488+
margin-bottom: 60px;
489+
}
490+
491+
/* ---------------------- ERROR ------------------------- */
492+
493+
.icon-error span {
494+
font-size: 130px;
495+
}
496+
497+
.notfound-padd {
498+
padding-top: 170px;
499+
padding-bottom: 50px;
500+
}
501+
502+
/* ---------------------- CART ------------------------- */
503+
504+
.title-cart {
505+
font-size: 14px;
506+
font-weight: 200;
507+
letter-spacing: 0.01em;
508+
line-height: 35px;
509+
vertical-align: 0px;
510+
}
511+
512+
.shop-cart table .product img {
513+
margin-right: 10px;
514+
}
515+
516+
517+
/* ---------------------- CONTACT ------------------------- */
518+
519+
.expertise-contact {
520+
margin-bottom: 60px;
521+
}
522+
523+
524+
/* ---------------------- BARKERY ------------------------- */
525+
526+
527+
.sub-bakery {
528+
display: block;
529+
padding-top: 30px;
530+
}
531+
532+
/* ---------------------- PLUGINS ------------------------- */
533+
534+
.pop-track-plugin {
535+
margin-top: 40px;
536+
}
537+
538+
.cake-pack-plugin {
539+
margin-top: 40px;
540+
}
541+
542+
.results-plugin {
543+
padding: 25px 0;
544+
}
545+
546+
.plugin-right {
547+
text-align: right;
548+
}
549+
550+
.breadcurmbs-plugin a{
551+
padding: 0px;
552+
display: inline-block;
553+
}
554+
555+
556+
557+
558+
.title-2 {
559+
font-size: 25px;
560+
line-height: 30px;
561+
}
562+
563+
.title-3 {
564+
font-size: 35px;
565+
font-weight: 200;
566+
letter-spacing: 0.01em;
567+
line-height: 35px;
568+
}
569+
382570
}
383571

384572

@@ -524,6 +712,14 @@
524712
bottom: 0;
525713
}
526714

715+
#slideout-2 {
716+
bottom: 0;
717+
}
718+
719+
#slideout_inner-2 {
720+
bottom: 0;
721+
}
722+
527723
/* ---------------------- SHOWCASE ------------------------- */
528724

529725
.featured-case h3 {
@@ -534,6 +730,90 @@
534730
text-align: center;
535731
}
536732

733+
/* ---------------------- CALENDAR ------------------------- */
734+
735+
.title-calendar h1 {
736+
line-height: 55px;
737+
}
738+
739+
/* ---------------------- GET INVOLVED ------------------------- */
740+
741+
.get-involved h2 {
742+
line-height: 55px;
743+
}
744+
745+
.icon-getinvolved {
746+
display: block;
747+
font-size: 100px;
748+
margin-top: 30px;
749+
}
750+
751+
/* ---------------------- MY CAKE ------------------------- */
752+
753+
.title-mycake h1 {
754+
line-height: 50px;
755+
}
756+
757+
758+
/* ---------------------- TRADEMARKS ------------------------- */
759+
760+
761+
762+
.t-circle-trade {
763+
margin-bottom: 60px;
764+
}
765+
766+
.box-mark {
767+
margin-bottom: 180px;
768+
}
769+
770+
771+
/* ---------------------- CART ------------------------- */
772+
773+
.title-cart {
774+
font-size: 14px;
775+
font-weight: 200;
776+
letter-spacing: 0.01em;
777+
line-height: 35px;
778+
vertical-align: 0px;
779+
}
780+
781+
.shop-cart table .product img {
782+
margin-right: 10px;
783+
}
784+
785+
/* ---------------------- CONTACT ------------------------- */
786+
787+
.expertise-contact {
788+
margin-bottom: 50px;
789+
}
790+
791+
/* ---------------------- PLUGINS ------------------------- */
792+
793+
.pop-track-plugin {
794+
margin-top: 40px;
795+
}
796+
797+
.cake-pack-plugin {
798+
margin-top: 40px;
799+
}
800+
801+
802+
803+
.title-2 {
804+
font-size: 25px;
805+
line-height: 30px;
806+
}
807+
808+
.title-3 {
809+
font-size: 35px;
810+
font-weight: 200;
811+
letter-spacing: 0.01em;
812+
line-height: 35px;
813+
}
814+
815+
816+
537817
}
538818

539819

‎webroot/css/style.css

+7,284-6,271
Large diffs are not rendered by default.

‎webroot/img/flags.png

68.1 KB
Loading

‎webroot/img/flags@2x.png

181 KB
Loading

‎webroot/js/intl.tel.min.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎webroot/js/support.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(function () {
2+
$('.support-form').on('submit', function (e) {
3+
e.preventDefault();
4+
var phoneInput = $('#intl-phone-number'),
5+
countryInfo = phoneInput.intlTelInput("getSelectedCountryData");
6+
7+
phoneInput.val(countryInfo.dialCode + phoneInput.val());
8+
9+
$.post('/contacts/rapid', $(this).serialize(), function (response) {
10+
$('.rapid-contact-feedback').css('background', 'green').html('Your contact was send.');
11+
}).fail(function () {
12+
$('.rapid-contact-feedback').css('background', 'red').html('Please try again.');
13+
}).always(function () {
14+
$('#rapidresponse').modal('toggle');
15+
});
16+
});
17+
18+
$('.type-select').on('change', function (e) {
19+
$('.hidden-fields').hide();
20+
21+
if ($(this).val() == 'call') {
22+
$('.phone-field').show();
23+
} else if ($(this).val() == 'skype') {
24+
$('.skype-field').show();
25+
}
26+
});
27+
28+
$('#intl-phone-number').intlTelInput();
29+
})();

‎webroot/js/youtube_videos.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
$('.portfolio').append(createVideoElement(item));
3535
});
3636

37-
callback();
37+
if (callback) {
38+
callback();
39+
}
3840
});
3941
}
4042

0 commit comments

Comments
 (0)
Please sign in to comment.