Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added exceptions to var:logs/cache/volt; Changed templates to volt; A…

…dded partials vs. main layout; Added 404 page

	modified:   .gitignore
	deleted:    app/controllers/ControllerBase.php
	renamed:    app/cache/dummy -> app/var/logs/dummy.txt
	new file:   app/var/logs/website.log
	new file:   app/var/volt/dummy.txt
	new file:   app/views/404/404.html
	renamed:    app/views/about/index.phtml -> app/views/about/index.volt
	renamed:    app/views/documentation/index.phtml -> app/views/documentation/index.volt
	renamed:    app/views/download/index.phtml -> app/views/download/index.volt
	deleted:    app/views/index.phtml
	new file:   app/views/index.volt
	renamed:    app/views/index/index.phtml -> app/views/index/index.volt
	deleted:    app/views/layouts/main.phtml
	new file:   app/views/partials/footer.volt
	new file:   app/views/partials/header.volt
	new file:   app/views/partials/navbar.volt
	renamed:    app/views/support/index.phtml -> app/views/support/index.volt
  • Loading branch information...
commit 21ccbdd67edf42b2f0f87a5c65a67a670d3cfb35 1 parent a371b94
@niden niden authored
View
3  .gitignore
@@ -1,7 +1,8 @@
.DS_Store
public/.DS_Store
public/files/.DS_Store
-app/cache/*cache
+app/var/cache/*
+app/var/volt/*.php
.settings/
*.komodoproject
*.sublime-*
View
9 app/controllers/ControllerBase.php
@@ -1,9 +0,0 @@
-<?php
-
-class ControllerBase extends Phalcon\Mvc\Controller
-{
- public function initialize()
- {
- Phalcon\Tag::prependTitle('Phalcon PHP | ');
- }
-}
View
0  app/cache/dummy → app/var/logs/dummy.txt
File renamed without changes
View
0  app/var/logs/website.log
No changes.
View
0  app/var/volt/dummy.txt
No changes.
View
115 app/views/404/404.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Phalcon PHP | High performance PHP framework</title>
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" type="text/css"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rosario" type="text/css"> <link rel="stylesheet" href="/css/s.css" type="text/css"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="description" content="PhalconPHP is a web framework delivered as a C extension providing high performance and lower resource consumption"/>
+ <meta name="author" content="PhalconPHP Team" />
+</head>
+<body>
+<div id="header">
+ <h1>
+ <a href="/index"><img border="0" src="/img/logo-small-sp.png"></a>
+ </h1>
+ <div align="center">
+ <div id="nav-main" role="navigation">
+ <div class="menubar">
+ <div class="nav-main-features nav-first">
+ <a href="/index">HOME</a>
+ </div>
+ <div class="nav-main-features">
+ <a href="/download">DOWNLOAD</a>
+ </div>
+ <div class="nav-main-features">
+ <a href="/documentation">DOCUMENTATION</a>
+ </div>
+ <div class="nav-main-features">
+ <a href="/support">SUPPORT</a>
+ </div>
+ <div class="nav-main-features">
+ <a href="https://github.com/phalcon/cphalcon">GITHUB</a>
+ </div>
+ <div class="nav-main-features">
+ <a target="blog" href="http://blog.phalconphp.com/">BLOG</a>
+ </div>
+ <div class="nav-main-features">
+ <a href="/about">ABOUT</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div align="center">
+ <div class="sub-content">
+ <div class="sub">
+ <a href="/download"><img border="0" src="/img/download-sp.png"><br/>Download and Try<br/><span>C extensions are available for many platforms</span><br /></a> </div>
+ <div class="sub">
+ <a href="/documentation"><img border="0" src="/img/book.png"><br/>Learn and Enjoy<br/><span>Read updated documentation and guides</span></a> </div>
+ <div class="sub">
+ <a href="https://twitter.com/phalconphp">
+ <img border="0" src="/img/chat.png">.
+ <br/>
+ Share and Socialize<br/>
+ <span>Tell your friends about the Phalcon framework in social networks</span>
+ </a>
+ </div>
+ </div>
+</div>
+
+<div id="github-con">
+ <div id="github" style="display:none">
+ <a href="https://github.com/phalcon/cphalcon">Star me on Github</a>
+ </div>
+</div>
+
+<div id="footer" align="center">
+ <table class="footer-table">
+ <tr>
+ <td class="social tweets" align="left" valign="top">
+ <p>
+ <label>Follow and Tweet</label>
+ <div id="tweet">
+ <p>Please wait while our updates load</p>
+ </div>
+ <a href="https://twitter.com/phalconphp" class="twitter-follow-button" data-show-count="false">Follow @phalconphp</a>
+ </p>
+ </td>
+ <td class="social" align="left" valign="top">
+ <p>
+ <label>Social</label><br />
+ <a href="http://twitter.com/phalconphp">Follow us on Twitter</a><br />
+ <a href="http://www.facebook.com/pages/Phalcon/134230726685897">Facebook Page</a><br />
+ <a href="https://plus.google.com/102376109340560896457">Google+ Page</a><br />
+ <a href="http://blog.phalconphp.com">Official Blog</a><br />
+ </p>
+ <p>
+ <label>Support</label><br />
+ <a href="https://github.com/phalcon/cphalcon/issues">Issues on Github</a><br />
+ <a href="http://stackoverflow.com/questions/tagged/phalcon">StackOverflow</a><br />
+ <a href="https://groups.google.com/forum/#!forum/phalcon">Support and Community</a>
+ </p>
+ <p>
+ <label>Get Involved</label><br />
+ <a href="/about">About</a><br />
+ <a href="https://github.com/phalcon/cphalcon/wiki/Roadmap">Roadmap</a>
+ </p>
+ </td>
+ <td class="subscribe" align="left" valign="top">
+ <p>
+ <label>Get Monthly News</label><br />
+ <form action="/index/subscribe/" method="post"> <table>
+ <tr>
+ <td><input type="text" placeholder="Your email address" size="25" name="email" id="email" value=""></td>
+ <td><input type="submit" value="Subscribe"></td>
+ </tr>
+ </table>
+ </form> </p>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<script src="/javascript/gs.js" type="text/javascript"></script> <script src="/javascript/twitter.min.js" type="text/javascript"></script> </body>
+</html>
View
0  app/views/about/index.phtml → app/views/about/index.volt
File renamed without changes
View
9 app/views/documentation/index.phtml → app/views/documentation/index.volt
@@ -1,10 +1,9 @@
-<?php use Phalcon\Tag as Tag; ?>
-<?php echo Tag::stylesheetLink("css/colors/zenburn.css") ?>
+{{ stylesheet_link("css/colors/zenburn.css") }}
<div class="doc-box">
<table width="60%" align="center">
<tr>
- <td><?php echo Tag::image('img/book.png') ?></td>
+ <td>{{ image('img/book.png') }}</td>
<td>
<h2>Documentation</h2>
Searching for the latest documentation for PhalconPHP? How does it
@@ -34,8 +33,7 @@
<a href="http://docs.phalconphp.com/en/latest/index.html">Latest PhalconPHP Documentation</a>
[<a href="https://github.com/phalcon/docs">Github Repo</a>]
<ul>
- <li><a href="http://docs.phalconphp.com/en/0.6.0/index.html">0.6.0 (beta) Documentation (English)</a></li>
- <li><a href="http://docs.phalconphp.com/en/latest/index.html">0.5.0 (stable) Documentation (English)</a></li>
+ <li><a href="http://docs.phalconphp.com/en/0.5.0/index.html">0.5.0 (stable) Documentation (English)</a></li>
<li><a href="http://docs.phalconphp.com/en/0.4.4/index.html">0.4.4 (old-stable) Documentation (English)</a></li>
</ul>
There is also documentation outlining the internal API of PhalconPHP.
@@ -48,7 +46,6 @@
<h3>Other resources</h3>
<ul>
<li><a href="https://github.com/phalcon/cphalcon/wiki/PhalconPHP-Examples">List of examples</a></li>
- <li><a href="https://github.com/phalcon/cphalcon/wiki/Projects-using-PhalconPHP">Projects using PhalconPHP</a></li>
</ul>
</td>
View
49 app/views/download/index.phtml → app/views/download/index.volt
@@ -1,14 +1,9 @@
-<?php
-
-use \Phalcon\Tag as Tag;
-echo Tag::stylesheetLink("css/colors/zenburn.css");
-
-?>
+{{ stylesheet_link("css/colors/zenburn.css") }}
<div class="doc-box">
<table width="60%" align="center">
<tr>
- <td><?php echo Tag::image('img/download-sp.png') ?></td>
+ <td>{{ image('img/download-sp.png') }}</td>
<td>
<h2>Downloads</h2>
Phalcon is a C extension so you need to download a binary for your platform or compile
@@ -32,20 +27,20 @@ echo Tag::stylesheetLink("css/colors/zenburn.css");
<strong><?php echo $version_key; ?></strong>
</td>
</tr>
- <?php foreach ($version as $file) { ?>
- <tr class="cellDown downloadCell">
+ {% for file in version %}
+ <tr class="cellDown downloadCell">
<td align="left">
- <?php echo $file['name']; ?>
+ {{ file['name'] }}
<br />
- <span>Updated: <?php echo $file['date']; ?></span>
- <?php echo Tag::linkTo(array($file['file'], 'download', 'target' => '_download', 'title' => $file['name'])); ?>
+ <span>Updated: {{ file['date'] }}</span>
+ {{ link_to(file['file'], 'download', 'target': '_download', 'title': file['name']) }}
</td>
</tr>
- <?php } ?>
+ {% endfor %}
<?php } ?>
<tr class="cellDown downloadCell">
<td align="left">
- Phalcon 0.5.2 - Source-Code
+ Phalcon 0.6.0 - Source-Code
<a target="_download" href="https://github.com/phalcon/cphalcon/" title="GitHub Repo">github</a>
</td>
</tr>
@@ -62,7 +57,7 @@ echo Tag::stylesheetLink("css/colors/zenburn.css");
</td>
</tr>
- <?php if (count($alpha) > 0) { ?>
+ {% if (alpha) %}
<tr><td><br /><br /></td></tr>
<tr>
<th class="titleContent">Alpha versions</th>
@@ -73,24 +68,24 @@ echo Tag::stylesheetLink("css/colors/zenburn.css");
<strong><?php echo $version_key; ?></strong>
</td>
</tr>
- <?php foreach ($version as $file) { ?>
+ {% for file in version %}
<tr class="cellDown downloadCell">
<td align="left">
- <?php echo $file['name']; ?>
+ {{ file['name'] }}
<br />
- <span>Updated: <?php echo $file['date']; ?></span>
- <?php echo Tag::linkTo(array($file['file'], 'download', 'target' => '_download', 'title' => $file['name'])); ?>
+ <span>Updated: {{ file['date'] }}</span>
+ {{ link_to(file['file'], 'download', 'target': '_download', 'title': file['name']) }}
</td>
</tr>
- <?php } ?>
- <?php } ?>
+ {% endfor %}
<?php } ?>
<tr class="cellDown downloadCell">
<td align="left">
- Phalcon 0.6.0 - Source-Code
+ Phalcon 0.6.0 - Source-Code
<a target="_download" href="https://github.com/phalcon/cphalcon/tree/0.6.0" title="GitHub Repo">github</a>
</td>
- </tr>
+ </tr>
+ {% endif %}
<tr><td><br /><br /></td></tr>
@@ -104,20 +99,20 @@ echo Tag::stylesheetLink("css/colors/zenburn.css");
<strong><?php echo $version_key; ?></strong>
</td>
</tr>
- <?php foreach ($version as $file) { ?>
+ {% for file in version %}
<tr class="cellDown downloadCell">
<td align="left">
<?php echo $file['name']; ?>
<br />
<span>Updated: <?php echo $file['date']; ?></span>
- <?php echo Tag::linkTo(array($file['file'], 'download', 'target' => '_download', 'title' => $file['name'])); ?>
+ {{ link_to(file[file], 'download', 'target': '_download', 'title': file[name]) }}
</td>
</tr>
- <?php } ?>
+ {% endfor %}
<?php } ?>
<tr class="cellDown downloadCell">
<td align="left">
- Phalcon 0.4.5 - Source-Code
+ Phalcon 0.5.2 - Source-Code
<a target="_download" href="https://github.com/phalcon/cphalcon/" title="GitHub Repo">github</a>
</td>
</tr>
View
17 app/views/index.phtml
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
- <meta name="description" content="PhalconPHP is a web framework delivered as a C extension providing high performance and lower resource consumption"/>
- <?php
- echo Phalcon\Tag::stylesheetLink("http://fonts.googleapis.com/css?family=Rosario", false);
- echo Phalcon\Tag::stylesheetLink("css/s.css");
- echo Phalcon\Tag::getTitle()
- ?>
- </head>
- <body>
- <?php echo $this->getContent() ?>
- <script type="text/javascript" src="http://phalconphp.com/javascript/gs.js"></script>
- <script type="text/javascript" src="http://phalconphp.com/javascript/twitter.min.js"></script>
- </body>
-</html>
View
14 app/views/index.volt
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+ {{ partial('partials/header') }}
+ <body>
+ {{ partial('partials/navbar') }}
+
+ {{ content() }}
+
+ {{ partial('partials/footer') }}
+
+ {{ javascript_include(config.app.js.gs, config.app.js.local) }}
+ {{ javascript_include(config.app.js.twitter, config.app.js.local) }}
+ </body>
+</html>
View
25 app/views/index/index.phtml → app/views/index/index.volt
@@ -1,9 +1,4 @@
-<?php
-
-use Phalcon\Tag;
-echo $this->getContent();
-
-?>
+{{ content() }}
<div align="left">
<div id="main-content">
@@ -25,7 +20,7 @@ echo $this->getContent();
<div class="btn btn-try">Try it Online</div>
</a>
<td align="center">
- <?php echo Tag::linkTo(array('download', '<div class="btn btn-download">Download</div>', 'class' => 'no-decoration')) ?>
+ {{ link_to('download', '<div class="btn btn-download">Download</div>', 'class': 'no-decoration') }}
</td>
</tr>
</table>
@@ -44,16 +39,20 @@ echo $this->getContent();
<div align="center">
<div class="sub-content">
<div class="sub">
- <?php echo Tag::linkTo('download', Tag::image(array('img/download-sp.png', 'border' => '0')).
- '<br/>Download and Try<br/><span>C extensions are available for many platforms</span>') ?><br/>
+ {% set dl_image = image('img/download-sp.png', 'border': '0') %}
+ {{ link_to('download', dl_image ~ '<br/>Download and Try<br/><span>C extensions are available for many platforms</span><br />') }}
</div>
<div class="sub">
- <?php echo Tag::linkTo('documentation', Tag::image(array('img/book.png', 'border' => '0')).
- '<br/>Learn and Enjoy<br/><span>Read updated documentation and guides</span>') ?>
+ {% set book_image = image('img/book.png', 'border': '0') %}
+ {{ link_to('documentation', book_image ~ '<br/>Learn and Enjoy<br/><span>Read updated documentation and guides</span>') }}
</div>
<div class="sub">
- <a href="https://twitter.com/phalconphp"><?php echo Tag::image(array('img/chat.png', 'border' => '0')).
- '<br/>Share and Socialize<br/><span>Tell your friends about the Phalcon framework in social networks</span>' ?></a>
+ <a href="https://twitter.com/phalconphp">
+ {{ image('img/chat.png', 'border': '0') }}
+ <br/>
+ Share and Socialize<br/>
+ <span>Tell your friends about the Phalcon framework in social networks</span>
+ </a>
</div>
</div>
</div>
View
83 app/views/layouts/main.phtml
@@ -1,83 +0,0 @@
-<?php use Phalcon\Tag as Tag; ?>
-
-<div id="header">
- <h1>
- <?php echo Tag::linkTo('index', Tag::image(array('img/logo-small-sp.png', 'border' => 0))) ?>
- </h1>
- <div align="center">
- <div id="nav-main" role="navigation">
- <div class="menubar">
- <div class="nav-main-features nav-first">
- <?php echo Tag::linkTo('index', 'HOME'); ?>
- </div>
- <div class="nav-main-features">
- <?php echo Tag::linkTo('download', 'DOWNLOAD'); ?>
- </div>
- <div class="nav-main-features">
- <?php echo Tag::linkTo('documentation', 'DOCUMENTATION'); ?>
- </div>
- <div class="nav-main-features">
- <?php echo Tag::linkTo('support', 'SUPPORT'); ?>
- </div>
- <div class="nav-main-features">
- <a href="https://github.com/phalcon/cphalcon">GITHUB</a>
- </div>
- <div class="nav-main-features">
- <a target="blog" href="http://blog.phalconphp.com/">BLOG</a>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<?php echo $this->getContent(); ?>
-
-<div id="footer" align="center">
- <table class="footer-table">
- <tr>
- <td class="social tweets" align="left" valign="top">
- <p>
- <label>Follow and Tweet</label>
- <div id="tweet">
- <p>Please wait while our updates load</p>
- </div>
- <a href="https://twitter.com/phalconphp" class="twitter-follow-button" data-show-count="false">Follow @phalconphp</a>
- </p>
- </td>
- <td class="social" align="left" valign="top">
- <p>
- <label>Social</label><br/>
- <a href="http://twitter.com/phalconphp">Follow us on Twitter</a><br/>
- <a href="http://www.facebook.com/pages/Phalcon/134230726685897">Facebook Page</a><br/>
- <a href="https://plus.google.com/102376109340560896457">Google+ Page</a><br/>
- <a href="http://blog.phalconphp.com">Official Blog</a><br/>
- </p>
- <p>
- <label>Support</label><br/>
- <a href="https://github.com/phalcon/cphalcon/issues">Issues on Github</a><br/>
- <a href="http://stackoverflow.com/questions/tagged/phalcon">StackOverflow</a><br/>
- <a href="https://groups.google.com/forum/#!forum/phalcon">Support and Community</a>
- </p>
- <p>
- <label>Get Involved</label><br/>
- <?php echo Tag::linkTo('about', 'About') ?><br/>
- <a href="https://github.com/phalcon/cphalcon/wiki/Roadmap">Roadmap</a>
- </p>
- </td>
- <td class="subscribe" align="left" valign="top">
- <p>
- <label>Get Monthly News</label><br/>
- <?php echo Tag::form('index/subscribe') ?>
- <table>
- <tr>
- <td><?php echo Tag::textField(array('email', 'placeholder' => 'Your email address', 'size' => 25)) ?></td>
- <td><?php echo Tag::submitButton('Subscribe') ?></td>
- </tr>
- </table>
- </form>
- </p>
- </td>
- </tr>
- </table>
-</div>
-
View
48 app/views/partials/footer.volt
@@ -0,0 +1,48 @@
+<div id="footer" align="center">
+ <table class="footer-table">
+ <tr>
+ <td class="social tweets" align="left" valign="top">
+ <p>
+ <label>Follow and Tweet</label>
+ <div id="tweet">
+ <p>Please wait while our updates load</p>
+ </div>
+ <a href="https://twitter.com/phalconphp" class="twitter-follow-button" data-show-count="false">Follow @phalconphp</a>
+ </p>
+ </td>
+ <td class="social" align="left" valign="top">
+ <p>
+ <label>Social</label><br />
+ <a href="http://twitter.com/phalconphp">Follow us on Twitter</a><br />
+ <a href="http://www.facebook.com/pages/Phalcon/134230726685897">Facebook Page</a><br />
+ <a href="https://plus.google.com/102376109340560896457">Google+ Page</a><br />
+ <a href="http://blog.phalconphp.com">Official Blog</a><br />
+ </p>
+ <p>
+ <label>Support</label><br />
+ <a href="https://github.com/phalcon/cphalcon/issues">Issues on Github</a><br />
+ <a href="http://stackoverflow.com/questions/tagged/phalcon">StackOverflow</a><br />
+ <a href="https://groups.google.com/forum/#!forum/phalcon">Support and Community</a>
+ </p>
+ <p>
+ <label>Get Involved</label><br />
+ {{ link_to('about', 'About') }}<br />
+ <a href="https://github.com/phalcon/cphalcon/wiki/Roadmap">Roadmap</a>
+ </p>
+ </td>
+ <td class="subscribe" align="left" valign="top">
+ <p>
+ <label>Get Monthly News</label><br />
+ {{ form('index/subscribe') }}
+ <table>
+ <tr>
+ <td>{{ text_field('email', 'placeholder': 'Your email address', 'size': 25) }}</td>
+ <td>{{ submit_button('Subscribe') }}</td>
+ </tr>
+ </table>
+ {{ end_form() }}
+ </p>
+ </td>
+ </tr>
+ </table>
+</div>
View
10 app/views/partials/header.volt
@@ -0,0 +1,10 @@
+<head>
+ <meta charset="utf-8">
+ {{ get_title() }}
+ {{ stylesheet_link(config.app.css.font_sans, false) }}
+ {{ stylesheet_link(config.app.css.font_rosario, false) }}
+ {{ stylesheet_link(config.app.css.site) }}
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="description" content="PhalconPHP is a web framework delivered as a C extension providing high performance and lower resource consumption"/>
+ <meta name="author" content="PhalconPHP Team" />
+</head>
View
33 app/views/partials/navbar.volt
@@ -0,0 +1,33 @@
+<div id="header">
+ <h1>
+ {% set logo = image('img/logo-small-sp.png', 'border': 0) %}
+ {{ link_to('', logo) }}
+ </h1>
+ <div align="center">
+ <div id="nav-main" role="navigation">
+ <div class="menubar">
+ <div class="nav-main-features nav-first">
+ {{ link_to('', 'HOME') }}
+ </div>
+ <div class="nav-main-features">
+ {{ link_to('download', 'DOWNLOAD') }}
+ </div>
+ <div class="nav-main-features">
+ {{ link_to('documentation', 'DOCUMENTATION') }}
+ </div>
+ <div class="nav-main-features">
+ {{ link_to('support', 'SUPPORT') }}
+ </div>
+ <div class="nav-main-features">
+ <a href="https://github.com/phalcon/cphalcon">GITHUB</a>
+ </div>
+ <div class="nav-main-features">
+ <a target="blog" href="http://blog.phalconphp.com/">BLOG</a>
+ </div>
+ <div class="nav-main-features">
+ {{ link_to('about', 'ABOUT') }}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
View
9 app/views/support/index.phtml → app/views/support/index.volt
@@ -1,10 +1,9 @@
-<?php use Phalcon\Tag as Tag; ?>
-<?php echo Tag::stylesheetLink("css/colors/zenburn.css") ?>
+{{ stylesheet_link("css/colors/zenburn.css") }}
<div class="doc-box">
<table width="60%" align="center">
<tr>
- <td><?php echo Tag::image('img/chat.png') ?></td>
+ <td>{{ image('img/chat.png') }}</td>
<td>
<h2>Support</h2>
Got stuck somewhere? Usage questions? Curious about the project or a feature? You are in the right place!
@@ -22,12 +21,12 @@
<h3>Latest version</h3>
Many bugs raised because users are not running the latest version.
- Please visit the <?php echo Tag::linkTo('download', 'download'); ?> page
+ Please visit the {{ link_to('download', 'download') }} page
and confirm if the issue you are experiencing is indeed a bug.
<br />
<h3>Documentation</h3>
- Please use the <?php echo Tag::linkTo('documentation', 'documentation'); ?>
+ Please use the {{ link_to('documentation', 'documentation') }}
before anything else. You can also use the search feature in our documents
to find what you are looking for. If your question is still not answered,
there are more options below.
Please sign in to comment.
Something went wrong with that request. Please try again.