Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

item name and price are now loaded from file name.

  • Loading branch information...
commit fcfcc00cdf6374b0ff9d81d634e7c7928eabf967 1 parent 5f368fc
@s3265176 authored
View
14 app/Plugin/Croogo/View/Layouts/foundation_contact.ctp
@@ -66,9 +66,9 @@
</p>
<p><span class="label">Open hour:</span><br />
- &nbsp&nbsp&nbsp&nbsp Monday to Satday: 6:00am -6:00pm<br />
- &nbsp&nbsp&nbsp&nbsp Sunday: 7:00am -4:00pm <br />
- &nbsp&nbsp&nbsp&nbsp public holiday: please check our news
+ &nbsp&nbsp&nbsp&nbsp Monday to Satday: 6:00am -6:00pm<br />
+ &nbsp&nbsp&nbsp&nbsp Sunday: 7:00am -4:00pm <br />
+ &nbsp&nbsp&nbsp&nbsp public holiday: please check our news
</p>
<br />
<br />
@@ -89,12 +89,12 @@
<h5>Map</h5>
<!-- Clicking this placeholder fires the mapModal Reveal modal -->
<p>
- <a href="" data-reveal-id="mapModal"><img src="http://placehold.it/400x280"></a><br />
+ <a href="" data-reveal-id="mapModal"><?php echo $this->Html->image("Croogo.map.jpg");?></a><br />
<a href="" data-reveal-id="mapModal">View Map</a>
</p>
<p>
- 123 Awesome St.<br />
- Barsoom, MA 95155
+ 469 Centre Road<br />
+ Bentleigh, Victoria
</p>
</div>
<!-- End Sidebar -->
@@ -104,7 +104,7 @@
<!-- Map Modal -->
<div class="reveal-modal" id="mapModal">
<h4>Where We Are</h4>
- <p><img src="http://placehold.it/800x600" /></p>
+ <p><?php echo $this->html->image("Croogo.map.jpg");?></p>
<!-- Any anchor with this class will close the modal. This also inherits certain styles, which can be overriden. -->
<a href="#" class="close-reveal-modal">&times;</a>
</div>
View
40 app/Plugin/Croogo/View/Layouts/foundation_news.ctp
@@ -96,24 +96,44 @@
<!-- End Sidebar -->
</div>
- <!-- End Nav -->
- <!-- Footer -->
+ <!-- Managed By -->
+ <div class="row">
+ <div class="large-9 columns">
+ <div class="panel">
+ <div class="row">
- <!-- Footer -->
- <?php echo $this->element('footer');?>
+ <div class="large-2 small-6 columns">
+ <img src="http://placehold.it/300x300&text=Site Owner">
+ </div>
- </div>
+ <div class="large-10 small-6 columns">
+ <strong>This Site Is Managed By<hr/></strong>
+ Risus ligula, aliquam nec fermentum vitae, sollicitudin eget urna. Donec dignissim nibh fermentum odio ornare sagittis
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- End Managed By -->
+
+ </div>
+
+ <!-- Footer -->
+ <?php echo $this->element('footer');?>
+ <!-- Footer -->
+
+ </div>
+
- <!-- init foundation js-->
- <script>document.write('<script src=/js/vendor/'+ ('__proto__' in {} ? 'zepto' : 'jquery')+ '.js><\/script>');</script>
- <script> $(document).foundation();</script>
-</body>
+ <!-- init foundation js-->
+ <script>document.write('<script src=/js/vendor/'+ ('__proto__' in {} ? 'zepto' : 'jquery')+ '.js><\/script>');</script>
+ <script> $(document).foundation();</script>
+ </body>
-</html>
+ </html>
View
2  app/Plugin/Croogo/webroot/css/foundation.css
@@ -17,7 +17,7 @@ body {
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
font-weight: normal;
font-style: normal;
- line-height: 1;
+
position: relative;
cursor: default; }
View
3  app/Plugin/Croogo/webroot/css/theme.css
@@ -51,7 +51,8 @@ body{
form .textarea textarea { width: 300px; }
form .error-message { color: #ee4b33; }
- #header {height:150px; background-color: #102E37}
+ #header {height:245px; background-color: black; background-image: url('../img/logo-s.jpg'); background-position: right
+ ;background-repeat: no-repeat; background-size: 60%}
#header .site-tagline { color: #666; font-style: italic; font-size: 13px; }
#header h1 a { color: #FCD271;text-decoration: none; }
/**
View
25 app/Plugin/Nodes/Controller/NodesController.php
@@ -825,9 +825,10 @@ public function home(){
$dir=APP."plugin/Croogo/webroot/img/home_slider";
- $imgs = array_slice(scandir($dir,1),0,-2);
+ $imgs = array_slice(scandir($dir,1),0,-2);
$this->set('images',$imgs );
+
}
public function news(){
@@ -888,6 +889,7 @@ public function news(){
public function products(){
$this->layout = 'foundation';
+ $root_dir = APP."plugin/Croogo/webroot/img/products";
$breads_dir=APP."plugin/Croogo/webroot/img/products/breads";
$sweets_dir=APP."plugin/Croogo/webroot/img/products/sweets";
$pies_dir=APP."plugin/Croogo/webroot/img/products/pies";
@@ -921,36 +923,45 @@ public function products(){
break;
}
if(!$dir==null ){
- $imgs = array_slice(scandir($dir,1),0,-2);
+ $imgs = array_slice(scandir($dir),0,-3);
foreach ($imgs as $key => $img){
$imgs[$key] = $type.'/'.$img;
}
+
+ $popular = array_slice(scandir($dir.'/popular',1),0,-2);
+ $popular_description = explode('.', $popular[0]);
+ $popular[0] = $type.'/popular/'.$popular[0];
}else{
- $imgs1 = scandir($breads_dir,1);
+ $imgs1 = scandir($breads_dir);
foreach ($imgs1 as $key => $img){
$imgs1[$key] = 'breads'.'/'.$img;
}
- $imgs2 = scandir($sweets_dir,1);
+ $imgs2 = scandir($sweets_dir);
foreach ($imgs2 as $key => $img){
$imgs2[$key] ='sweets'.'/'.$img;
}
- $imgs3 = scandir($pies_dir,1);
+ $imgs3 = scandir($pies_dir);
foreach ($imgs3 as $key => $img){
$imgs3[$key] = 'pies'.'/'.$img;
}
- $imgs4 = scandir($biscuits_dir,1);
+ $imgs4 = scandir($biscuits_dir);
foreach ($imgs4 as $key => $img){
$imgs4[$key] = 'biscuits'.'/'.$img;
}
+ $popular = array_slice(scandir($root_dir.'/popular',1),0,-2);
+ $popular_description = explode('.', $popular[0]);
+ $popular[0] = '/popular/'.$popular[0];
- $imgs = array_merge(array_slice($imgs1, 0, -2),array_slice($imgs2, 0, -2),array_slice($imgs3, 0, -2),array_slice($imgs4, 0, -2));
+ $imgs = array_merge(array_slice($imgs1, 0, -3),array_slice($imgs2, 0, -3),array_slice($imgs3, 0, -3),array_slice($imgs4, 0, -3));
}
+ $this->set('popular_description',$popular_description[0]);
+ $this->set('popular',$popular[0] );
$this->set('images',$imgs );
View
6 app/Plugin/Nodes/View/Nodes/home.ctp
@@ -41,17 +41,17 @@
<div class="row">
<div class="large-4 columns">
- <?php echo $this->Html->image('home_section/1.jpg');?>
+ <?php echo $this->Html->image('Croogo.home_section/1.jpg');?>
<h4>This is a content section.</h4>
<p>Bacon ipsum dolor sit amet nulla ham qui sint exercitation eiusmod commodo, chuck duis velit. Aute in reprehenderit, dolore aliqua non est magna in labore pig pork biltong. Eiusmod swine spare ribs reprehenderit culpa. Boudin aliqua adipisicing rump corned beef.</p>
</div>
<div class="large-4 columns">
- <?php echo $this->Html->image('home_section/2.jpg');?>
+ <?php echo $this->Html->image('Croogo.home_section/2.jpg');?>
<h4>This is a content section.</h4>
<p>Bacon ipsum dolor sit amet nulla ham qui sint exercitation eiusmod commodo, chuck duis velit. Aute in reprehenderit, dolore aliqua non est magna in labore pig pork biltong. Eiusmod swine spare ribs reprehenderit culpa. Boudin aliqua adipisicing rump corned beef.</p>
</div>
<div class="large-4 columns">
- <?php echo $this->Html->image('home_section/3.jpg');?>
+ <?php echo $this->Html->image('Croogo.home_section/3.jpg');?>
<h4>This is a content section.</h4>
<p>Bacon ipsum dolor sit amet nulla ham qui sint exercitation eiusmod commodo, chuck duis velit. Aute in reprehenderit, dolore aliqua non est magna in labore pig pork biltong. Eiusmod swine spare ribs reprehenderit culpa. Boudin aliqua adipisicing rump corned beef.</p>
</div>
View
45 app/Plugin/Nodes/View/Nodes/products.ctp
@@ -44,13 +44,13 @@
<div class="large-4 small-12 columns">
- <img src="http://placehold.it/500x500&text=Logo">
-
<div class="hide-for-small panel">
<h3>Most popular</h3>
- <h5 class="subheader">Description of the most popular products</h5>
- </div>
+ <?php echo $this->Html->image('Croogo.products/'.$popular)?>
+ <h5 class="subheader"><?php echo $popular_description ?></h5>
+ </div>
+
</div>
<!-- End Side Bar -->
@@ -64,11 +64,16 @@
$id =1;
foreach ($images as &$image)
{
+ $parts = explode('&', $image);
+ $info = explode('$', $parts[1]);
+ $name =$info[0];
+ $price='$'.$info[1];
+
echo "<div class='large-4 small-6 columns'>";
echo "<a href='' data-reveal-id='".$id."'>".$this->Html->image('Croogo.products/'.$image)."</a>";
echo "<div class = 'panel'>";
- echo "<h5>".$image."</h5>";
- echo "<h6 class = 'subheader'>".$image."</h6>";
+ echo "<h5>".$name."</h5>";
+ echo "<h6 class = 'subheader'>".$price."</h6>";
echo "</div></div>";
$id++;
}
@@ -81,8 +86,10 @@
$id =1;
foreach ($images as &$image)
{
+
+
//data reveal modal
- echo "<div class='reveal-modal expand' id='".$id."'>";
+ echo "<div class='reveal-modal xlarge' id='".$id."'>";
echo "<h4>".$image."</h4>";
echo "<p>".$this->Html->image('Croogo.products/'.$image)."</p>";
echo "<a href='#' class='close-reveal-modal'>&times;</a>";
@@ -93,31 +100,11 @@
?>
<!-- End Data reveal modal for each products-->
- <!-- Managed By -->
- <div class="row">
- <div class="large-12 columns">
- <div class="panel">
- <div class="row">
-
- <div class="large-2 small-6 columns">
- <img src="http://placehold.it/300x300&text=Site Owner">
- </div>
-
- <div class="large-10 small-6 columns">
- <strong>This Site Is Managed By<hr/></strong>
+
- Risus ligula, aliquam nec fermentum vitae, sollicitudin eget urna. Donec dignissim nibh fermentum odio ornare sagittis
- </div>
-
- </div>
- </div>
- </div>
-
- <!-- End Managed By -->
-
- </div>
</div>
</div>
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.