Skip to content

Commit 3c850cd

Browse files
committed
Merge branch 'stage'
2 parents 20ffe3e + 4f19232 commit 3c850cd

File tree

13 files changed

+637
-5
lines changed

13 files changed

+637
-5
lines changed

config/routes.php

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
$routes->connect('/get-involved', ['controller' => 'Pages', 'action' => 'display', 'get-involved']);
8080
$routes->connect('/team', ['controller' => 'Pages', 'action' => 'display', 'team']);
8181
$routes->connect('/business-solutions', ['controller' => 'Pages', 'action' => 'display', 'business-solutions']);
82+
$routes->connect('/roadtrip', ['controller' => 'Pages', 'action' => 'display', 'road_trip']);
8283

8384
$routes->redirect('/pages/documentation', 'http://book.cakephp.org/');
8485
$routes->redirect('/documentation', 'http://book.cakephp.org/');

src/Controller/ContactsController.php

+18
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Cake\Mailer\Email;
66
use Cake\Event\Event;
77

8+
/**
9+
* @property \App\Model\Table\ContactsTable $Contacts
10+
*/
811
class ContactsController extends AppController
912
{
1013
public function beforeFilter(Event $event)
@@ -29,6 +32,21 @@ public function rapid()
2932
$this->response->statusCode(422);
3033
}
3134

35+
public function roadTrip()
36+
{
37+
$this->autoRender = false;
38+
39+
$contact = $this->Contacts->createRapidContact(['type' => 'road_trip', 'subject' => 'road_trip'] + $this->request->data);
40+
41+
if ($this->Contacts->save($contact)) {
42+
$this->sendEmail($contact);
43+
44+
$this->Flash->success(__('Thank you, we are adding your city to the list if others and will let you know if we choose yours to visit.'), ['key' => 'contact']);
45+
}
46+
47+
return $this->redirect('/roadtrip');
48+
}
49+
3250
private function sendEmail($contact)
3351
{
3452
$email = new Email('default');

src/Model/Table/ContactsTable.php

+6
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ private function extractRapidBody($data)
112112
case 'skype':
113113
$body = 'skype me at ' . $data['skype'];
114114
break;
115+
case 'road_trip':
116+
$body = 'come to ' . $data['where'];
117+
break;
115118
default:
116119
throw new \InvalidArgumentException();
117120
}
@@ -147,6 +150,9 @@ private function extractRapidSubject($data)
147150
case 'training':
148151
$subject = 'Rapid Response: Training';
149152
break;
153+
case 'road_trip':
154+
$subject = 'Road Trip';
155+
break;
150156
default:
151157
throw new \InvalidArgumentException();
152158
}

src/Template/Element/Layout/default/menu/menu.ctp

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@
2525
$this->Html->link(
2626
__('Swag'),
2727
'https://swag.cakephp.org/',
28-
['escape' => false, 'class' => 'new-tag', 'target' => '_blank']
28+
['escape' => false, 'target' => '_blank']
29+
);?>
30+
</li>
31+
<li>
32+
<?=
33+
$this->Html->link(
34+
__('Road Trip'),
35+
['controller' => 'Pages', 'action' => 'display', 'road_trip'],
36+
['escape' => false, 'class' => 'new-tag']
2937
);?>
3038
</li>
3139
<li>

src/Template/Pages/road_trip.ctp

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* @var \App\View\AppView $this
4+
*/
5+
6+
$this->assign('title', __('CakePHP is coming to your town!'));
7+
?>
8+
<section class="clearfix">
9+
<div class="container-fluid">
10+
<div class="row roadtrip-hero">
11+
<?= $this->Flash->render('contact') ?>
12+
<?= $this->Html->image('roadtrip-hero.svg') ?>
13+
</div>
14+
</div>
15+
</section>
16+
<section>
17+
<div class="container roadtrip-body">
18+
<div class="row">
19+
<div class="col-md-6 col-md-offset-3">
20+
<h1><?= __('CakePHP is coming to your town!') ?></h1>
21+
<p><?= __('Cake Road Trip is an opportunity for members of CakePHP core team come visit you at a local PHP meetup! The Team is keen to meet community members from around the world, bringing Cake Road Trip to you! Keen to have us come visit your meetup? Well, this is the opportunity to let us know! We are trying our best to come to as many locations as possible.') ?></p>
22+
</div>
23+
</div>
24+
<div class="row">
25+
<div class="col-md-6 col-md-offset-3">
26+
<?= $this->Html->image('plaque2.svg', ['class' => 'plaque2svg']) ?>
27+
<h2><?= __('We’re just waiting for your invitation') ?></h2>
28+
<p><?= __('If you have a PHP or CakePHP meetup group and are excited to have us come visit, let us know soon! We will go to as many places as we can fit into our Cake Road Trip. And will be asking the community to vote for the top places to visit!') ?></p>
29+
</div>
30+
</div>
31+
<div class="row">
32+
<div class="col-md-6 col-md-offset-3">
33+
<?= $this->Form->create(null, ['url' => ['controller' => 'Contacts', 'action' => 'roadTrip'], 'class' => 'road-form']) ?>
34+
<?= $this->Form->input('name', ['label' => __('Name {0}', $this->Html->tag('span', __('(Required)'))), 'escape' => false, 'class' => 'form-control', 'required' => true]) ?>
35+
<?= $this->Form->input('email', ['label' => __('Email {0}', $this->Html->tag('span', __('(Required)'))), 'escape' => false, 'class' => 'form-control', 'required' => true]) ?>
36+
<?= $this->Form->input('where', ['label' => __('Tell us where would you’d like us to go next {0}', $this->Html->tag('span', __('(Required)'))), 'escape' => false, 'class' => 'form-control', 'required' => true]) ?>
37+
<?= $this->Form->button(__('Notify me!')) ?>
38+
<?= $this->Form->end() ?>
39+
</div>
40+
</div>
41+
</div>
42+
<div class="roadtrip-bottom">
43+
<?= $this->Html->image('roadtrip-footer-img.svg') ?>
44+
</div>
45+
</section>

webroot/css/style.css

+218
Original file line numberDiff line numberDiff line change
@@ -10321,3 +10321,221 @@ code {
1032110321
.t-extral {
1032210322
font-weight: 300;
1032310323
}
10324+
10325+
10326+
/* ---------------------- ROAD TRIP ------------------------- */
10327+
10328+
.roadtrip-hero {
10329+
overflow: hidden;
10330+
}
10331+
10332+
.roadtrip-hero img {
10333+
width: 100%;
10334+
}
10335+
10336+
.roadtrip-hero .alert {
10337+
margin-top: 90px;
10338+
margin-bottom: -60px;
10339+
}
10340+
10341+
.roadtrip-body {
10342+
padding-top: 40px;
10343+
text-align: center;
10344+
}
10345+
10346+
.roadtrip-body p {
10347+
font-family: 'Roboto', sans-serif;
10348+
font-size: 15px;
10349+
line-height: 20px;
10350+
font-weight: 400;
10351+
}
10352+
10353+
10354+
.roadtrip-body h1{
10355+
text-align: center;
10356+
font-size: 40px;
10357+
font-weight: 900;
10358+
}
10359+
10360+
.roadtrip-body h2{
10361+
font-size: 30px;
10362+
line-height: 32px;
10363+
margin: 0 0 35px 0;
10364+
font-weight: 900;
10365+
}
10366+
10367+
.plaque1svg {
10368+
width: 120px;
10369+
padding: 25px 0 30px;
10370+
}
10371+
10372+
.plaque2svg {
10373+
max-width: 550px;
10374+
display: block;
10375+
margin: 80px auto 40px;
10376+
}
10377+
10378+
.road-cloud1 {
10379+
max-width: 110px;
10380+
left: -30%;
10381+
}
10382+
10383+
10384+
.road-cloud2 {
10385+
max-width: 142px;
10386+
right: -30%;
10387+
}
10388+
10389+
.road-cloud1, .road-cloud2 {
10390+
position: absolute;;
10391+
bottom: 0;
10392+
}
10393+
.road-hosts {
10394+
position: relative;
10395+
}
10396+
10397+
.road-quote {
10398+
border: 2px solid #F8F7F4;
10399+
border-radius: 10px;
10400+
position: relative;
10401+
margin-top: 80px;
10402+
padding: 80px 20px 10px;
10403+
}
10404+
10405+
.road-quote span {
10406+
color: #D33C44;
10407+
}
10408+
10409+
.road-quote-photo {
10410+
margin: auto;
10411+
position: absolute;
10412+
left: 0;
10413+
right: 0;
10414+
top: -50px;
10415+
width: 100px;
10416+
height: 100px;
10417+
overflow: hidden;
10418+
border-radius: 50px;
10419+
box-shadow:
10420+
0 0 0 6px white,
10421+
0 0 0 8px #F8F7F4;
10422+
10423+
}
10424+
10425+
@media (max-width:991px) {
10426+
10427+
.roadtrip-hero img {
10428+
width: 150%;
10429+
max-width: inherit !important;
10430+
margin-left: -25%;
10431+
}
10432+
.roadtrip-hero .alert {
10433+
margin-top: 70px;
10434+
}
10435+
.road-cloud1, .road-cloud2 {
10436+
display: none;
10437+
}
10438+
}
10439+
10440+
@media (max-width:530px) {
10441+
.roadtrip-hero img {
10442+
width: 250%;
10443+
margin-left: -74%;
10444+
}
10445+
}
10446+
10447+
.road-form {
10448+
text-align: left;
10449+
margin-top: 40px;
10450+
padding: 40px 40px 25px;
10451+
background-color: #f7f6f3;
10452+
margin-bottom: 80px;
10453+
}
10454+
10455+
.road-form label span{
10456+
font-weight: 500;
10457+
}
10458+
10459+
.road-form button {
10460+
display: block;
10461+
margin: 30px auto 20px auto;
10462+
border: 0;
10463+
background-color: #D33C44;
10464+
color: white;
10465+
font-weight: 800;
10466+
font-size: 16px;
10467+
padding: 10px 20px;
10468+
border-radius: 10px;
10469+
}
10470+
10471+
.road-form button:hover {
10472+
background-color: #363637;
10473+
transition: all 0.5s ease;
10474+
}
10475+
10476+
.road-form h3 {
10477+
text-align: center;
10478+
margin: 30px 0 60px;
10479+
}
10480+
10481+
.road-form .form-control {
10482+
display: block;
10483+
width: 100%;
10484+
min-height: 54px;
10485+
padding: 15px 15px;
10486+
font-size: 14px;
10487+
line-height: 1.42857143;
10488+
color: #FFF;
10489+
background-color: #fff;
10490+
background-image: none;
10491+
border: 1px solid #ccc;
10492+
border-radius: 0px;
10493+
-webkit-box-shadow: none;
10494+
box-shadow: none;
10495+
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
10496+
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
10497+
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
10498+
border: 1px solid #ddddd4;
10499+
color: #363637;
10500+
}
10501+
10502+
.road-form .form-control:focus {
10503+
border: 1px solid #d33c44;
10504+
}
10505+
10506+
.road-form .form-group:nth-last-of-type(n+2) {
10507+
margin-bottom: 30px;
10508+
}
10509+
10510+
.roadtrip-select select {
10511+
background-color: #F8F7F4;
10512+
border: 0;
10513+
border-radius: 0;
10514+
padding: 10px 20px !important;
10515+
display: block;
10516+
width: 100%;
10517+
}
10518+
10519+
10520+
.roadtrip-update {
10521+
text-align: left;
10522+
border: 2px solid #F8F7F4;
10523+
padding: 30px;
10524+
border-radius: 20px;
10525+
margin: 50px auto;
10526+
}
10527+
10528+
.roadtrip-update h3 {
10529+
font-family: 'Roboto', sans-serif;
10530+
font-weight: 300;
10531+
}
10532+
10533+
.roadtrip-bottom {
10534+
width: 100%;
10535+
margin: 0;
10536+
}
10537+
10538+
.roadtrip-bottom img{
10539+
width: 100%;
10540+
margin: 0;
10541+
}

webroot/css/writers.css

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
.writers-hero {
66
padding-top: 140px;
77
background: #f7f6f3;
8-
background: -moz-linear-gradient(left, #ffffff 0%, #f4f4f2 100%); /* FF3.6-15 */
9-
background: -webkit-linear-gradient(left, #ffffff 0%,#f4f4f2 100%); /* Chrome10-25,Safari5.1-6 */
10-
background: linear-gradient(to right, #ffffff 0%,#f4f4f2 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
11-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f4f4f2',GradientType=1 ); /* IE6-9 */
128
}
139

1410
.writers-hero h1 img {

webroot/img/cloud1.svg

+1
Loading

webroot/img/cloud2.svg

+25
Loading

webroot/img/plaque1.svg

+1
Loading

0 commit comments

Comments
 (0)