UI
This commit is contained in:
parent
57d9f6ba27
commit
7dc08d0742
17
II/T.pm
17
II/T.pm
@ -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;
|
||||||
|
16
t/head.html
16
t/head.html
@ -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>] 
|
||||||
<a href="/me">почитать</a> свою переписку. А еще
|
[<a href="/get">получить сообщения</a>] 
|
||||||
можно <a href="/">вернуться</a> в ленту.
|
[<a href="/me">моя переписка</a>] 
|
||||||
|
[<a href="/out">неотправленные сообщения</a>] 
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- <hr> -->
|
<!-- <hr> -->
|
||||||
|
Loading…
Reference in New Issue
Block a user