This commit is contained in:
Difrex(Denis Zheleztsov) 2014-06-16 11:36:35 +04:00
parent 57d9f6ba27
commit 7dc08d0742
2 changed files with 22 additions and 11 deletions

17
II/T.pm
View File

@ -20,11 +20,11 @@ sub head {
} }
sub echo { sub echo {
my ($self, $echo) = @_; my ( $self, $echo ) = @_;
my $e = HTML::Template->new(filename => 't/echo.html'); my $e = HTML::Template->new( filename => 't/echo.html' );
$e->param(ECHO => $echo); $e->param( ECHO => $echo );
return $e->output(); return $e->output();
} }
@ -103,7 +103,7 @@ sub post {
} }
$p->param( SUBG => $data->{subg} ); $p->param( SUBG => $data->{subg} );
$p->param( CUT => $cut ); $p->param( CUT => $cut );
$p->param( TIME => "$time" ); $p->param( TIME => "$time" );
$p->param( FROM => $data->{from} ); $p->param( FROM => $data->{from} );
$p->param( TO => $data->{to} ); $p->param( TO => $data->{to} );
@ -115,10 +115,10 @@ sub post {
} }
sub new_mes { sub new_mes {
my ($self, $echo) = @_; my ( $self, $echo ) = @_;
my $n = HTML::Template->new(filename => 't/new.html'); my $n = HTML::Template->new( filename => 't/new.html' );
$n->param(ECHO => $echo); $n->param( ECHO => $echo );
return $n->output(); return $n->output();
} }
@ -155,7 +155,8 @@ sub pre {
$post =~ s/(.?)\n/$1<br>\n/g; $post =~ s/(.?)\n/$1<br>\n/g;
$post $post
=~ s/(https?:\/\/.+\.(jpg|png|gif))/<a href="$1"><img src="$1" width="15%" height="15%" \/><\/a>/g; =~ s/(https?:\/\/.+\.(jpg|png|gif))/<a href="$1"><img src="$1" width="15%" height="15%" \/><\/a>/g;
$post
=~ s/(https?:\/\/.+\.(JPG|PNG|GIF))/<a href="$1"><img src="$1" width="15%" height="15%" \/><\/a>/g;
# Not are regexp parsing # Not are regexp parsing
my $pre = 0; my $pre = 0;
my $txt; my $txt;

View File

@ -27,6 +27,9 @@
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 0px; margin-bottom: 0px;
} }
.post a {
text-decoration: none;
}
.post img { .post img {
display: inline-block; display: inline-block;
border-radius: 10px; border-radius: 10px;
@ -74,6 +77,12 @@
margin-top: -1.5em; margin-top: -1.5em;
text-align: center; text-align: center;
} }
.headall a {
color: #222;
}
.headall a:hover {
color: #666;
}
.echo { .echo {
display: block; display: block;
background-color: #C7BA6C; background-color: #C7BA6C;
@ -120,9 +129,10 @@
<div class='headall'> <div class='headall'>
<h1><TMPL_VAR NAME=TITLE></h1> <h1><TMPL_VAR NAME=TITLE></h1>
<p> <p>
<a href="/get">Получить</a> новые сообщения или [<a href="/">лента</a>]&nbsp
<a href="/me">почитать</a> свою переписку. А еще [<a href="/get">получить сообщения</a>]&nbsp
можно <a href="/">вернуться</a> в ленту. [<a href="/me">моя переписка</a>]&nbsp
[<a href="/out">неотправленные сообщения</a>]&nbsp
</p> </p>
</div> </div>
<!-- <hr> --> <!-- <hr> -->