Permalink
Browse files

date added

  • Loading branch information...
1 parent cd45c06 commit 5e3de6a01bcd392643b124beffa7e1e541e6917a Filip Sergot committed Mar 12, 2014
Showing with 7 additions and 4 deletions.
  1. +1 −0 data/blog/hello_world
  2. +4 −2 gen.p6
  3. +1 −1 tmpls/blog/post.mojo
  4. +1 −1 tmpls/index.mojo
@@ -1,3 +1,4 @@
+01-01-2014
<h2>Witamy na stronie Poznańskiej grupy Perl, poznan.pm.org!</h2>
Projekt dopiero co ruszył dlatego strona wygląda jak wygląda. Niedługo się to zmieni. :)
View
@@ -76,8 +76,10 @@ sub blog(@items) {
my @ret;
for @items -> $i {
my ($l, $t) = split(~$i);
- my $post = Post.new(location => "$l/$t", title => $t, date => "TODOay");
- $post.content = slurp $i;
+ my $post = Post.new(location => "$l/$t", title => $t);
+ my ($date, @content) = $i.IO.lines;
+ $post.date = $date;
+ $post.content = @content.join: "\n";
@ret.push: $post;
}
return @ret.item;
@@ -2,7 +2,7 @@
% for $posts.list -> $p {
<div id="post">
<div id="title">
- <div class="postdate">TODOay</div><div class="posttitle"><a href="/<%= $p.location %>"><%= $p.title %></a></div>
+ <div class="postdate"><%= $p.date %></div><div class="posttitle"><a href="/<%= $p.location %>"><%= $p.title %></a></div>
</div>
<p class="postcontent">
<%= $p.content %>
View
@@ -16,7 +16,7 @@
<a href="/">Strona Główna</a><br>
% for $menu.list -> $m {
-<a href="/<%= $m.location %>"><%= $m.title %></a><br>
+ <a href="/<%= $m.location %>"><%= $m.title %></a><br>
% }
</div>

0 comments on commit 5e3de6a

Please sign in to comment.