Skip to content

Commit

Permalink
date added
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Sergot committed Mar 12, 2014
1 parent cd45c06 commit 5e3de6a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/blog/hello_world
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,4 @@
01-01-2014
<h2>Witamy na stronie Poznańskiej grupy Perl, poznan.pm.org!</h2> <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. :) Projekt dopiero co ruszył dlatego strona wygląda jak wygląda. Niedługo się to zmieni. :)
Expand Down
6 changes: 4 additions & 2 deletions gen.p6
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ sub blog(@items) {
my @ret; my @ret;
for @items -> $i { for @items -> $i {
my ($l, $t) = split(~$i); my ($l, $t) = split(~$i);
my $post = Post.new(location => "$l/$t", title => $t, date => "TODOay"); my $post = Post.new(location => "$l/$t", title => $t);
$post.content = slurp $i; my ($date, @content) = $i.IO.lines;
$post.date = $date;
$post.content = @content.join: "\n";
@ret.push: $post; @ret.push: $post;
} }
return @ret.item; return @ret.item;
Expand Down
2 changes: 1 addition & 1 deletion tmpls/blog/post.mojo
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% for $posts.list -> $p { % for $posts.list -> $p {
<div id="post"> <div id="post">
<div id="title"> <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> </div>
<p class="postcontent"> <p class="postcontent">
<%= $p.content %> <%= $p.content %>
Expand Down
2 changes: 1 addition & 1 deletion tmpls/index.mojo
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="/">Strona Główna</a><br> <a href="/">Strona Główna</a><br>
% for $menu.list -> $m { % for $menu.list -> $m {


<a href="/<%= $m.location %>"><%= $m.title %></a><br> <a href="/<%= $m.location %>"><%= $m.title %></a><br>


% } % }
</div> </div>
Expand Down

0 comments on commit 5e3de6a

Please sign in to comment.