Skip to content

Commit

Permalink
Final templates
Browse files Browse the repository at this point in the history
  • Loading branch information
J-P Stacey committed Feb 6, 2016
1 parent bc90d97 commit bee2bed
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function results(Request $request, Application $app, $lang, $find)
return $app->redirect('/');
}

if (!preg_match("/^[a-z]+\$/", $need)) {
if (!preg_match("/^[a-z]+\$/", $find)) {
return $app->redirect('/');
}

Expand Down
8 changes: 8 additions & 0 deletions views/base.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
<link rel="stylesheet" href="/css/app.css">
</head>
<body>
<div class="row">
<div class="large-12 columns">
{% block languages %}
<a href="/en">English</a>|<a href="/ar" dir="rtl">العربية</a>
{% endblock %}
</div>
</div>

<div class="row">
<div class="large-12 columns">
<h1>{% block title %}{% endblock %}</h1>
Expand Down
4 changes: 2 additions & 2 deletions views/location-ar.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

{% block content %}
<div class="small-6 columns">
<a href="/en/choose" class="button">
<a href="/ar/choose" class="button">
<img src="//placehold.it/64x64" class="float-left" alt="">
<h2>I'm at home now: set my location.</h2>
</a>
</div>

<div class="small-6 columns">
<a href="/en/choose" class="button">
<a href="/ar/choose" class="button">
<img src="//placehold.it/64x64" class="float-left" alt="">
<h2>I'm not at home: add my address.</h2>
</a>
Expand Down
33 changes: 33 additions & 0 deletions views/need-ar-money.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends "base.twig" %}

{% block title %}Money (in Arabic){% endblock %}

{% block standfirst %}
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum maximus tincidunt sagittis. Pellentesque justo neque, tincidunt non viverra nec, auctor eget nisl.</p>
{% endblock %}

{% block content %}
<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="//placehold.it/600x200" class="thumbnail" alt="">
<h2>Post office</h2>
<p>If you have your identification card you can get money form the Post Office.</p>
<a href="/ar/results/postoffice" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Find a Post Office</p>
</a>
</div>
</div>

<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="//placehold.it/600x200" class="thumbnail" alt="">
<h2>Western Union</h2>
<p>You can receive money from your family using Western Union</p>
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Find Western Union</p>
</a>
</div>
</div>
{% endblock %}
33 changes: 33 additions & 0 deletions views/need-en-money.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends "base.twig" %}

{% block title %}Money{% endblock %}

{% block standfirst %}
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum maximus tincidunt sagittis. Pellentesque justo neque, tincidunt non viverra nec, auctor eget nisl.</p>
{% endblock %}

{% block content %}
<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="//placehold.it/600x200" class="thumbnail" alt="">
<h2>Post office</h2>
<p>If you have your identification card you can get money form the Post Office.</p>
<a href="/en/results/postoffice" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Find a Post Office</p>
</a>
</div>
</div>

<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="//placehold.it/600x200" class="thumbnail" alt="">
<h2>Western Union</h2>
<p>You can receive money from your family using Western Union</p>
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Find Western Union</p>
</a>
</div>
</div>
{% endblock %}
6 changes: 0 additions & 6 deletions views/result-ar-postoffice.twig

This file was deleted.

6 changes: 0 additions & 6 deletions views/result-en-postoffice.twig

This file was deleted.

47 changes: 47 additions & 0 deletions views/results-ar-postoffice.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% extends "base.twig" %}

{% block title %}Post offices near you (in Arabic){% endblock %}

{% block content %}
<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="https://maps.googleapis.com/maps/api/streetview?size=600x300&location=53.372722,-1.4682351&heading=234.28&pitch=0&key=AIzaSyBEoWw039wZsgCN9sBND-oLlQfzFJ6vLwo" class="thumbnail" alt="">
<p>228 Shoreham St, Sheffield, England</p>
<div class="row">
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate using Street View</p>
</a>
</div>
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate on a map</p>
</a>
</div>
</div>
</div>
</div>

<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="https://maps.googleapis.com/maps/api/streetview?size=600x300&location=53.3787745,-1.470125&heading=19.8&pitch=0&key=AIzaSyBEoWw039wZsgCN9sBND-oLlQfzFJ6vLwo" class="thumbnail" alt="">
<p>43 Charles St, Sheffield, England</p>
<div class="row">
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate using Street View</p>
</a>
</div>
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate on a map</p>
</a>
</div>
</div>
</div>
</div>
{% endblock %}
47 changes: 47 additions & 0 deletions views/results-en-postoffice.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% extends "base.twig" %}

{% block title %}Post offices near you{% endblock %}

{% block content %}
<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="https://maps.googleapis.com/maps/api/streetview?size=600x300&location=53.372722,-1.4682351&heading=234.28&pitch=0&key=AIzaSyBEoWw039wZsgCN9sBND-oLlQfzFJ6vLwo" class="thumbnail" alt="">
<p>228 Shoreham St, Sheffield, England</p>
<div class="row">
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate using Street View</p>
</a>
</div>
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate on a map</p>
</a>
</div>
</div>
</div>
</div>

<div class="small-12 medium-6 large-6 columns">
<div class="callout secondary">
<img src="https://maps.googleapis.com/maps/api/streetview?size=600x300&location=53.3787745,-1.470125&heading=19.8&pitch=0&key=AIzaSyBEoWw039wZsgCN9sBND-oLlQfzFJ6vLwo" class="thumbnail" alt="">
<p>43 Charles St, Sheffield, England</p>
<div class="row">
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate using Street View</p>
</a>
</div>
<div class="small-6 columns">
<a href="#" class="button expand">
<img src="//placehold.it/128x128" class="thumbnail" alt="">
<p>Navigate on a map</p>
</a>
</div>
</div>
</div>
</div>
{% endblock %}
34 changes: 18 additions & 16 deletions views/start.twig
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{% extends "base.twig" %}

{% block title %}Welcome to Sheffield!{% endblock %}

{% block content %}
<div class="large-12 columns">
<div class="row">
<div class="small-12 medium-6 large-6 columns">
<a class="button expanded" href="/en" class="primary callout">English</a>
</div>
<div class="small-12 medium-6 large-6 columns">
<a class="button expanded" dir="rtl" href="/ar" class="primary callout">العربية</a>
</div>
</div>
</div>
{% endblock %}
{% extends "base.twig" %}

{% block languages %}{% endblock %}

{% block title %}Welcome to Sheffield!{% endblock %}

{% block content %}
<div class="large-12 columns">
<div class="row">
<div class="small-12 medium-6 large-6 columns">
<a class="button expanded" href="/en" class="primary callout">English</a>
</div>
<div class="small-12 medium-6 large-6 columns">
<a class="button expanded" dir="rtl" href="/ar" class="primary callout">العربية</a>
</div>
</div>
</div>
{% endblock %}

0 comments on commit bee2bed

Please sign in to comment.