Permalink
Browse files

ちょうせい

  • Loading branch information...
1 parent aca2bf8 commit f348b5d46d1b100c30b38f02d4b3eac6d81b5c84 @kazeburo committed Jul 6, 2010
Showing with 20 additions and 22 deletions.
  1. +20 −22 lib/NoNoPaste.pm
View
42 lib/NoNoPaste.pm
@@ -140,8 +140,13 @@ __DATA__
<script src="<: $req.uri_for('/static/js/jquery-1.4.2.min.js') :>" type="text/javascript"></script>
<script src="<: $req.uri_for('/static/js/jstorage.js') :>" type="text/javascript"></script>
<script src="<: $req.uri_for('/static/js/prettify/prettify.js') :>" type="text/javascript"></script>
-
-: block javascript -> { }
+: block javascript -> {
+<script type="text/javascript">
+$(function() {
+ prettyPrint();
+});
+</script>
+: }
</body>
</html>
@@ -155,33 +160,33 @@ __DATA__
: block form | fillinform( $req ) -> {
<form method="post" action="/add" id="nopaste">
<textarea name="body" rows="20" cols="60"></textarea>
-
<label for="nick">nick</label>
<input type="text" id="nick" name="nick" value="" size="21" />
<input type="submit" id="post_nopaste" value="POST" />
</form>
-: }
+: } # block form
<h2 class="subheader">List</h2>
-<: for $entries -> $entry { :>
+: for $entries -> $entry {
<div class="entry">
<pre class="prettyprint">
<: $entry.body :>
</pre>
<div class="entry_meta"><a href="<: $req.uri_for('/entry/' ~ $entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
</div>
-<: } :>
+: }
+
<p class="paging">
-<: my $offset = $req.param('offset') || 0 :>
-<: if $offset >= 10 { :>
-<a href="<: $req.uri_for('/', [ offset => $offset - 10 ] ) :> ">Prev</a>
-<: } :>
-<: if $next { :>
+: my $offset = $req.param('offset') || 0
+: if $offset >= 10 {
+<a href="<: $req.uri_for('/', [ offset => $offset - 10 ] ) :>">Prev</a>
+: }
+: if $next {
<a href="<: $req.uri_for('/', [ offset => $offset + 10 ] ) :>">Next</a>
-<: } :>
-</p>
: }
+</p>
+: } # content
: override javascript -> {
<script type="text/javascript">
@@ -196,7 +201,7 @@ $(function() {
}
});
</script>
-: }
+: } # javascript
@@ entry.tx
@@ -211,12 +216,5 @@ $(function() {
</pre>
<div class="entry_meta"><a href="<: $req.uri_for('/entry/'~$entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
</div>
-: }
+: } # content
-: override javascript -> {
-<script type="text/javascript">
-$(function() {
- prettyPrint();
-});
-</script>
-: }

0 comments on commit f348b5d

Please sign in to comment.