Permalink
Browse files

add hypnotoad to spaghetti ^_^

  • Loading branch information...
1 parent 7aeba87 commit d78b7622ea39a1d5cd1351cd4675b33963e1ab2a Georgy Bazhukov committed May 23, 2012
Showing with 43 additions and 46 deletions.
  1. +6 −0 public/css/main.css
  2. +12 −0 script/run.pl
  3. +25 −46 templates/thread/show.html.ep
View
@@ -76,6 +76,7 @@
-khtml-border-radius:5px;
background: #e8e9eb;
padding: 5px 20px;
+ color: #555;
}
.subforum
@@ -214,6 +215,11 @@
text-decoration:none;
}
+ header.overall
+ {
+ margin-left:10px;
+ }
+
footer.overall
{
width:800px;
View
@@ -0,0 +1,12 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+# Load application class
+use lib 'lib';
+use Spaghetti::Defaults;
+use Spaghetti;
+
+# Start application
+Spaghetti->start;
@@ -1,6 +1,6 @@
% layout 'default';
%
-% title $threads->{$id}->{title} if exists $threads->{$id};
+% title $topic->{title};
%#
%# Topic
@@ -12,60 +12,37 @@
% my $t = $topic;
-<header class="topic" id="thread-<%= $t->{id} %>">
- <nav>
- <div class="sefl">
- <a href="<%= url_for('thread_show', url => ( $t->{url} ? $t->{url} : $t->{id} ) )
- %>"><%= ( defined $t->{title} && length $t->{title} ) ? $t->{title} : '#' %></a>
- </div>
+<header class="news" id="thread-<%= $t->{id} %>">
+ <div class="postContent">
+ <%=b $topic->{text} %>
+ </div>
+
+ <nav style="margin-bottom:20px;">
<div class="parents">
- <a href="<%= url_for('thread_show', url => $t->{parentId}) %>">&uarr;</a>
- <a href="<%= url_for('thread_show', url => $t->{topicId}) %>">&uArr;</a>
+ <a href="<%= url_for('thread_show', url => $topic->{parentId}) %>">&uarr;</a>
+ <a href="<%= url_for('thread_show', url => $topic->{topicId}) %>">&uArr;</a>
</div>
<div class="time">
- % if ( $t->{modifyAt} == $t->{createAt} ) {
- %
- <%= render_datetime($t->{modifyAt}) %>
- %
- % } else {
- %
- <acronym title="<%= format_datetime($t->{createAt}) %>">
- <%= render_datetime($t->{modifyAt}) %>
+ <acronym title="<%= format_datetime($topic->{createAt}) %>">
+ <%= render_datetime($topic->{modifyAt}) %>
</acronym>
- %
- % }
</div>
<div class="user">
- <%= render_user({ id => $t->{author},
- name => $t->{name},
- mail => $t->{mail},
- banId => $t->{banId} }) %>
+ <%= render_user( $topic->{author} ) %>
</div>
% if ( $t->{owner} == user->{id} || $t->{W} > 0 )
% {
<div class="controlls">
<div class="editThread">
-
- % if ( defined $t->{title} )
- % {
<a href="<%= url_for('topic_edit', id => $t->{id} )
%>"><%=l 'edit' %></a>
- % }else {
- <a href="<%= url_for('thread_edit', id => $t->{id} )
- %>"><%=l 'edit' %></a>
- % }
-
</div>
</div>
% }
<div class=cb></div>
</nav>
-
- <div class="postContent">
- <%=b $t->{text} %>
- </div>
% if ( $create && !$topic->{treeOfTree} )
% {
@@ -91,7 +68,7 @@
% $topicForm->elements->{parentId}->value = $topic->{id};
% $topicForm->elements->{topicId}->value = $topic->{id};
-<div>
+<div style="margin:10px 0px">
<a href="#" class=showButton id="showButton-<%= $topic->{id} %>"><%=l 'New topic' %></a>
<a href="#" class="hidden hideButton" id="hideButton-<%= $topic->{id} %>"><%=l 'hide' %></a>
@@ -119,21 +96,29 @@
% if ( $topic->{treeOfTree} )
% {
+<div class="subforums">
% for my $k ( sort { $b <=> $a } keys %$threads )
% {
% my $t = $threads->{$k};
%
-<article class="forum" id="thread-<%= $t->{id} %>">
+<article class="subforum" id="thread-<%= $t->{id} %>">
<table style="width: 100%">
<tr>
- <td style="width:500px;">
+ <td style="width:460px;">
<a href="<%= url_for('thread_show', url => ( $t->{url} ? $t->{url} : $t->{id} ) )
%>"><%= ( defined $t->{title} && length $t->{title} ) ? $t->{title} : '#' %></a>
</td>
<td style="text-align:right">
- <div class="time">
+ <div class="user">
+ <%= render_user({ id => $t->{author},
+ name => $t->{name},
+ mail => $t->{mail},
+ banId => $t->{banId} }) %>
+ </div>
+
+ <div class="alignright">
% if ( $t->{modifyAt} == $t->{createAt} ) {
%
<%= render_datetime($t->{modifyAt}) %>
@@ -146,19 +131,13 @@
%
% }
</div>
-
- <div class="user">
- <%= render_user({ id => $t->{author},
- name => $t->{name},
- mail => $t->{mail},
- banId => $t->{banId} }) %>
- </div>
</td>
</tr>
</table>
</article>
% }
+</div>
% }
% else
% {

0 comments on commit d78b762

Please sign in to comment.