diff --git a/system/includes/functions.php b/system/includes/functions.php
index b2157bd..e92ec29 100644
--- a/system/includes/functions.php
+++ b/system/includes/functions.php
@@ -57,10 +57,10 @@ function get_posts($page = 1, $perpage = 0){
// Create a new instance of the markdown parser
$md = new MarkdownParser();
- foreach($posts as $index => $v){
+ foreach($posts as $k=>$v){
$post = new stdClass;
-
+
// Extract the date
$arr = explode('_', $v);
@@ -91,19 +91,9 @@ function get_posts($page = 1, $perpage = 0){
$post->title = str_replace('
','',$arr[0]);
$post->body = $arr[1];
- // Get first and last post
- if ($index == 0) {
- $post->cls = 'item first';
- }
- elseif ($index == count($posts) - 1) {
- $post->cls = 'item last';
- }
- else {
- $post->cls = 'item';
- }
-
$tmp[] = $post;
}
+
return $tmp;
}
@@ -197,17 +187,6 @@ function get_tag($tag){
$arr = explode('
', $content);
$post->title = str_replace('','',$arr[0]);
$post->body = $arr[1];
-
- // Get first and last post
- if ($index == 0) {
- $post->cls = 'item first';
- }
- elseif ($index == count($posts) - 1) {
- $post->cls = 'item last';
- }
- else {
- $post->cls = 'item';
- }
$tmp[] = $post;
}
@@ -260,17 +239,6 @@ function get_archive($req){
$arr = explode('
', $content);
$post->title = str_replace('','',$arr[0]);
$post->body = $arr[1];
-
- // Get first and last post
- if ($index == 0) {
- $post->cls = 'item first';
- }
- elseif ($index == count($posts) - 1) {
- $post->cls = 'item last';
- }
- else {
- $post->cls = 'item';
- }
$tmp[] = $post;
}
@@ -648,16 +616,16 @@ function publisher(){
function analytics(){
$analytics = config('google.analytics.id');
$script = <<
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '{$analytics}']);
- _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);
- })();
-
+
EOF;
if (!empty($analytics)) {
return $script;
diff --git a/themes/default/main.html.php b/themes/default/main.html.php
index 86369e2..adde055 100644
--- a/themes/default/main.html.php
+++ b/themes/default/main.html.php
@@ -1,6 +1,19 @@
+
-