Changeset 16872

Show
Ignore:
Timestamp:
07/30/08 18:23:40 (5 years ago)
Author:
tomi-ru
Message:

どうせならネコにしよう

Location:
websites/mobilecat/trunk
Files:
3 added
4 modified

Legend:

Unmodified
Added
Removed
  • websites/mobilecat/trunk/lib/MobileCat/Controller/Root.pm

    r16871 r16872  
    55 
    66__PACKAGE__->config->{namespace} = ''; 
     7 
     8use Acme::Neko; 
    79 
    810sub index :Private { 
     
    2022    return unless $c->req->method eq 'POST'; 
    2123     
     24    if ($c->req->param('filter')) { 
     25        $c->req->param(body => do { 
     26            Acme::Neko->nya( $c->req->param('body') ); 
     27        }); 
     28    } 
     29      
    2230    $c->req->param(user_agent => $c->req->user_agent); 
    2331    $c->req->param(user_id    => $c->user->id) if $c->user_exists; 
  • websites/mobilecat/trunk/root/inc/macro.tt

    r16871 r16872  
    66    
    77   SET naked = 1 IF c.res.content_type == 'text/plain'; 
     8    
     9   SET noname = 'ニャニャシ'; 
    810 
    911   MACRO x(code) BLOCK; 
  • websites/mobilecat/trunk/root/index.tt

    r16850 r16872  
    55<div class="small"> 
    66    [% entry.created_at.set_locale('ja_JP').strftime('%{month}/%{day}(%a)%H:%M') %]<br /> 
    7     by: [% entry.user || "名無し" | html %]<br /> 
     7    by: [% entry.user || noname | html %]<br /> 
    88</div> 
    99 
     
    2121&#xE6E2;<a href="/post" accesskey="1">投稿する</a><br /> 
    2222&#xE6FB;<a href="/about">ここは何?</a><br /> 
     23&#xE6A2;マイページ<br /> 
    2324&#xE6D3;<a href="mailto:feedback@mobilecat.koneta.org">問い合わせ</a> 
  • websites/mobilecat/trunk/root/post.tt

    r16871 r16872  
    11[% IF c.user_exists %] 
    2 by: [% c.user.nickname || "名無し" | html %]<br /> 
     2by: [% c.user.nickname || noname | html %]<br /> 
    33<span class="small">(<a href="[% c.uri_for('/logout', { back => '/post' }) %]">ログアウトする</a>)</span><br /> 
    44 
    55[% ELSE %] 
    6 by: 名無し<br /> 
     6by: [% noname | html %]<br /> 
    77<span class="small">(<a href="[% c.uri_for('/login', { back => '/post' }) %]">ログインして書く</a>)</span><br /> 
    88 
    99[% END # IF %] 
    1010 
    11 <img src="http://static.koneta.org/dot.gif" height="3" /><br /> 
     11<img src="http://static.koneta.org/dot.gif" height="5" /><br /> 
    1212 
    1313<form action="[% c.uri_for('/post') %]" method="post"> 
    1414<textarea name="body" style="height:4em; width:97%;"> 
    1515</textarea><br /> 
     16<img src="http://static.koneta.org/dot.gif" height="5" /><br /> 
     17 
    1618<div class="center"><input type="submit" name="submit" value="投稿" /></div> 
     19<img src="http://static.koneta.org/dot.gif" height="5" /><br /> 
     20 
     21<input type="checkbox" checked="checked" name="filter" value="1" />ネコ化<br /> 
    1722</form>