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

15
II/T.pm
View File

@ -20,11 +20,11 @@ sub head {
}
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();
}
@ -115,10 +115,10 @@ sub post {
}
sub new_mes {
my ($self, $echo) = @_;
my ( $self, $echo ) = @_;
my $n = HTML::Template->new(filename => 't/new.html');
$n->param(ECHO => $echo);
my $n = HTML::Template->new( filename => 't/new.html' );
$n->param( ECHO => $echo );
return $n->output();
}
@ -155,7 +155,8 @@ sub pre {
$post =~ s/(.?)\n/$1<br>\n/g;
$post
=~ 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
my $pre = 0;
my $txt;

View File

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