Template integrated
authorArtem Daniliants <artem@daniliants.com>
Wed, 31 Mar 2010 11:40:40 +0000 (14:40 +0300)
committerArtem Daniliants <artem@daniliants.com>
Wed, 31 Mar 2010 11:43:56 +0000 (14:43 +0300)
Server/application/config/routes.php
Server/application/controllers/page.php [deleted file]
Server/application/controllers/pages.php [new file with mode: 0644]
Server/application/views/pages/base.php
Server/application/views/pages/tracking_analytics.php [new file with mode: 0644]
Server/static/css/style.css

index 0121b60..983ddaa 100644 (file)
@@ -4,4 +4,4 @@
  *
  * Sets the default route to "welcome"
  */
  *
  * Sets the default route to "welcome"
  */
-$config['_default'] = 'api';
+$config['_default'] = 'pages';
diff --git a/Server/application/controllers/page.php b/Server/application/controllers/page.php
deleted file mode 100644 (file)
index d47ca8d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-class Page_Controller extends Template_Controller {
-
-       public $template = 'pages/base'; //defaults to template but you can set your own view file
-
-       public $auto_render = TRUE; //defaults to true, renders the template after the controller method is done
-
-       public function __construct()
-       {
-               parent::__construct(); //necessary
-       }
-
-       public function index()
-       {
-               $this->template->content= 'to be replaced';
-       }
-}
\ No newline at end of file
diff --git a/Server/application/controllers/pages.php b/Server/application/controllers/pages.php
new file mode 100644 (file)
index 0000000..00e6507
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+class Pages_Controller extends Template_Controller {
+
+       public $template = 'pages/base'; //defaults to template but you can set your own view file
+
+       public $auto_render = TRUE; //defaults to true, renders the template after the controller method is done
+
+       public function __construct()
+       {
+               parent::__construct(); //necessary
+       }
+
+       public function index()
+       {
+               $this->template->title = 'Maemo application for car enthusiasts';
+               $this->template->header = 'Home';
+               $this->template->content = 'HOMEZ';
+       }
+}
\ No newline at end of file
index bf5aa16..6c44a1b 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-<title></title>
+<title><?php echo $title; ?> - SpeedFreak</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link href="<?php echo url::base(); ?>static/css/style.css" rel="stylesheet" type="text/css" />
 <link href="<?php echo url::base(); ?>static/css/layout.css" rel="stylesheet" type="text/css" />
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link href="<?php echo url::base(); ?>static/css/style.css" rel="stylesheet" type="text/css" />
 <link href="<?php echo url::base(); ?>static/css/layout.css" rel="stylesheet" type="text/css" />
 <script src="<?php echo url::base(); ?>static/js/cufon-replace.js" type="text/javascript"></script>
 <script src="<?php echo url::base(); ?>static/js/Myriad_Pro_700.font.js" type="text/javascript"></script>
 <script src="<?php echo url::base(); ?>static/js/Myriad_Pro_BC_700.font.js" type="text/javascript"></script>
 <script src="<?php echo url::base(); ?>static/js/cufon-replace.js" type="text/javascript"></script>
 <script src="<?php echo url::base(); ?>static/js/Myriad_Pro_700.font.js" type="text/javascript"></script>
 <script src="<?php echo url::base(); ?>static/js/Myriad_Pro_BC_700.font.js" type="text/javascript"></script>
-<!-- Google analytics -->
-    <script type="text/javascript">
-
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-13272012-1']);
-      _gaq.push(['_trackPageview']);
-
-      (function() {
-        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-      })();
-
-    </script>
-<!-- /Google analytics -->
+<?php echo View::factory('pages/tracking_analytics')->render(); ?>
 </head>
 
 </head>
 
-<body id="page5">
+<body id="index">
     <div class="top-bg">
     <div id="main">
     <div class="top-bg">
     <div id="main">
-        <!--header -->
+        <!-- Header -->
         <div id="header">
             <div class="menu">
                 <div class="left-bg">
                     <div class="right-bg">
         <div id="header">
             <div class="menu">
                 <div class="left-bg">
                     <div class="right-bg">
-                        <a href="index.html" class="home-link"><img src="<?php echo url::base(); ?>static/img/home-link.gif" alt="" /></a>
+                        <a href="<?php echo url::base(); ?>" class="home-link" title="SpeedFreak homepage"><img src="<?php echo url::base(); ?>static/img/home-link.gif" alt="Home icon" /></a>
                         <ul>
                         <ul>
-                            <li><a href="index.html">About</a></li>
-                            <li><a href="index-1.html">Services</a></li>
-                            <li><a href="index-2.html">Gallery</a></li>
-                            <li><a href="index-3.html">Events</a></li>
-                            <li><a href="index-4.html" class="active">Contacts</a></li>
+                            <li><a href="<?php echo url::base(); ?>" title="SpeedFreak Homepage">Home</a></li>
+                            <li><a href="<?php echo url::site('pages/screenshot'); ?>" title="SpeedFreak screenshots">Screenshots</a></li>
+                            <li><a href="<?php echo url::base('pages/community'); ?>" title="SpeedFreak community">Community</a></li>
+                            <li><a href="<?php echo url::base('pages/credits'); ?>" title="SpeedFreak developers and contributors">Credits</a></li>
+                            <li><a href="<?php echo url::base('pages/about'); ?>" title="SpeedFreak about">About</a></li>
                         </ul>
                     </div>
                 </div>
             </div>
                         </ul>
                     </div>
                 </div>
             </div>
-            <div class="logo"><a href="index.html"><img src="<?php echo url::base(); ?>static/img/logo.jpg" alt="" /></a></div>
+            <div class="logo"><a href="<?php echo url::base(); ?>"><img src="<?php echo url::base(); ?>static/img/logo.jpg" alt="" /></a></div>
         </div>
         </div>
-        <!--header end-->
+        <!-- /Header -->
         <div id="content">
             <div class="box1">
                 <div class="left-border">
         <div id="content">
             <div class="box1">
                 <div class="left-border">
                                 <div class="right-bot">
                                     <div class="left-top">
                                         <div class="right-top">
                                 <div class="right-bot">
                                     <div class="left-top">
                                         <div class="right-top">
-                                            <div class="indent4 line2">
+                                            <div class="indent1 line1">
                                                 <div class="container">
                                                     <div class="col-1">
                                                 <div class="container">
                                                     <div class="col-1">
-                                                        <h4>Our locations</h4>
-                                                        <strong>United States of America </strong>
-                                                        Fusce euismod consequat ante. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque sed dolor. Aliquam congue fermentum nisl. Mauris accumsan nulla vel diam.
-                                                        <p>
-                                                            <strong>Netherlands</strong>
-                                                            Sed in lacus ut enim adipiscing aliquet. Nulla venenatis. In pede mi, aliquet sit amet, euism in, auctor ut, ligula. Aliquam dapibus tincidunt metus. Praesent justo dolor, lobortis quis, lobortis dignissim, pulvinar ac, lorem. Vestibulum sed ante.
-                                                        </p>
-                                                        <p>
-                                                            <strong>New Zealand</strong>
-                                                            Maecenas tristique orci ac sem. Duis ultricies pharetra magna. Donec accumsan malesuada<br /> orci. Donec sit amet eros. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
-                                                        </p>
-                                                    </div>
-                                                    <div class="col-2 space1">
-                                                        <h4>Useful links</h4>
-                                                        <ul class="list">
-                                                            <li><a href="#">Lorem ipsum dolor vestibulum </a></li>
-                                                            <li><a href="#">Aenean nonummy hendrerit </a></li>
-                                                            <li><a href="#">Vivamus eget nibh Etiam cursus </a></li>
-                                                            <li><a href="#">Nulla facilisi Aenean nec eros </a></li>
-                                                            <li><a href="#">Vestibulum ante ipsum primis </a></li>
-                                                            <li><a href="#">In faucibus orci luctus et ltrices pos </a></li>
-                                                            <li><a href="#">Suspendisse sollicitudin velit leo </a></li>
-                                                            <li><a href="#">Ut pharetra augue nec augue Nam </a></li>
-                                                            <li><a href="#">Tincidunt ac, viverra sed, nulla onec </a></li>
-                                                            <li class="last"><a href="#">Quisque diam lorem Interdum </a></li>
-                                                        </ul>
-                                                        <div class="container"><p><a href="#" class="link"><span><span>More Info</span></span></a></p></div>
+                                                        <h3><?php echo $header; ?></h3>
+                                                        <?php echo $content; ?>
                                                     </div>
                                                 </div>
                                             </div>
                                                     </div>
                                                 </div>
                                             </div>
                     </div>
                 </div>
             </div>
                     </div>
                 </div>
             </div>
-            <div class="indent">
-                <div class="container">
-                    <div class="col-1">
-                        <div class="box2">
-                            <div class="left-border">
-                                <div class="right-border">
-                                    <div class="bot-border">
-                                        <div class="left-top">
-                                            <div class="right-top">
-                                                <div class="left-bot">
-                                                    <div class="right-bot">
-                                                        <div class="title">
-                                                            <div class="left-bg">
-                                                                <div class="right-bg">
-                                                                    <h5>Postal address</h5>
-                                                                </div>
-                                                            </div>
-                                                        </div>
-                                                        <div class="indent1 text4">
-                                                            Pellentesque sed dolor. Aliquam congue fermentum nisl. Mauris accumsan nulla vel diam. Sed in lacus ut enim adipiscing aliquet. Nulla venenatis.
-                                                            <div class="padding2">
-                                                                <p class="text5">
-                                                                    <strong>The Company Name Inc.<br />
-                                                                    8901 Marmora Road,<br />
-                                                                    Glasgow, D04 89GR.</strong>
-                                                                </p>
-                                                                <p class="padding1 text5">
-                                                                    <strong><span class="phone2">+1 800 559 6580</span>Freephone:<br />
-                                                                    <span class="phone2">+1 959 603 6035</span>Telephone:<br />
-                                                                    <span class="phone2">+1 504 889 9898</span>FAX:<br />
-                                                                    E-mail: <a href="#">mail@companyname.com</a></strong>
-                                                                </p>
-                                                            </div>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-2 space2">
-                        <div class="box2">
-                            <div class="left-border">
-                                <div class="right-border">
-                                    <div class="bot-border">
-                                        <div class="left-top">
-                                            <div class="right-top">
-                                                <div class="left-bot">
-                                                    <div class="right-bot">
-                                                        <div class="title">
-                                                            <div class="left-bg">
-                                                                <div class="right-bg">
-                                                                    <h5>Contact form</h5>
-                                                                </div>
-                                                            </div>
-                                                        </div>
-                                                        <div class="indent1">
-                                                            <form action="" method="get" enctype="multipart/form-data" id="ContactForm">
-                                                                <div>
-                                                                    <label><input type="text" name="name" onblur="if(this.value=='') this.value='Your Name:'" onfocus="if(this.value =='Your Name:' ) this.value=''" value="Your Name:" /></label>
-                                                                    <label><input type="text" name="phone" onblur="if(this.value=='') this.value='Telephone:'" onfocus="if(this.value =='Telephone:' ) this.value=''" value="Telephone:" /></label>
-                                                                    <label><input type="text" name="email" onblur="if(this.value=='') this.value='E-mail:'" onfocus="if(this.value =='E-mail:' ) this.value=''" value="E-mail:" /></label>
-                                                                    <textarea cols="10" rows="3" onblur="if(this.value=='') this.value='Message:'" onfocus="if(this.value =='Message:' ) this.value=''" name="msg">Message:</textarea>
-                                                                </div>
-                                                                <div class="container text2">
-                                                                    <a href="#" class="link2" onclick="document.getElementById('ContactForm').submit()"><span><span>Send</span></span></a>
-                                                                    <a href="#" class="link2" onclick="document.getElementById('ContactForm').reset()"><span><span>Clear</span></span></a>
-                                                                </div>
-                                                            </form>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <!--footer -->
+         </div>
+        <!-- Footer -->
         <div id="footer">
         <div id="footer">
-            <p>Car tuning &copy; 2009    <a href="index-5.html">Privacy Policy</a></p>
+            <p><a href="/">SpeedFreak-app.com</a> &copy; 2010</p>
         </div>
         </div>
-        <!--footer end-->
+        <!-- /Footer -->
     </div>
     </div>
     <script type="text/javascript"> Cufon.now(); </script>
     </div>
     </div>
     <script type="text/javascript"> Cufon.now(); </script>
+<?php echo View::factory('pages/tracking')->render(); ?>
 </body>
 
 </html>
 </body>
 
 </html>
diff --git a/Server/application/views/pages/tracking_analytics.php b/Server/application/views/pages/tracking_analytics.php
new file mode 100644 (file)
index 0000000..1973376
--- /dev/null
@@ -0,0 +1,15 @@
+<!-- Google analytics -->
+    <script type="text/javascript">
+
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-13272012-1']);
+      _gaq.push(['_trackPageview']);
+
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+
+    </script>
+<!-- /Google analytics -->
index cfd93e5..9f798b7 100644 (file)
@@ -20,7 +20,7 @@ a {color:#21b3c6; outline:none;}
 a:hover{text-decoration:none;}
 p {padding-top:20px;}
 h2{ font-size:3.846em; text-transform:uppercase; line-height:1.2em; padding-bottom:2px;}
 a:hover{text-decoration:none;}
 p {padding-top:20px;}
 h2{ font-size:3.846em; text-transform:uppercase; line-height:1.2em; padding-bottom:2px;}
-h3{ font-size:2.308em; background:url(../static/img/title-bg.gif) no-repeat 0 2px; color:#fff; line-height:1.2em; padding:0 0 3px 44px;}
+h3{ font-size:2.308em; background:url(../static/img/title-bg.gif) no-repeat 0 2px; color:#fff; line-height:1.2em; padding-bottom:5px;}
 h4{ font-size:1.538em; line-height:1.2em; padding-bottom:12px;}
 h5{ font-size:1.538em; line-height:1.2em; padding:7px 0 0 13px;}
 strong{ color:#21b3c6; display:block; padding-bottom:3px;}
 h4{ font-size:1.538em; line-height:1.2em; padding-bottom:12px;}
 h5{ font-size:1.538em; line-height:1.2em; padding:7px 0 0 13px;}
 strong{ color:#21b3c6; display:block; padding-bottom:3px;}