OSDN Git Service

jQuery
authoryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 10 Dec 2016 06:11:09 +0000 (15:11 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 10 Dec 2016 06:11:09 +0000 (15:11 +0900)
index.py
pybbs/title.htm

index 30593b8..f7e10b2 100755 (executable)
--- a/index.py
+++ b/index.py
@@ -324,7 +324,7 @@ class Application(tornado.web.Application):
                         'ui_modules':{'Footer':FooterModule},
                         'cookie_secret':'bZJc2sWbQLKos6GkHn/VB9oXwQt8SOROkRvJ5/xJ89E=',
                         'xsrf_cookies':True,
-                        #'debug':True,
+                        'debug':True,
                         'login_url':'/login'
                         }
         tornado.web.Application.__init__(self,handlers,**settings)
index d1c6809..82cb238 100644 (file)
@@ -2,19 +2,35 @@
 <html>
 <head><meta charset=utf-8><title>Titles</title>
 <style type=text/css>
-span.g1 {
-       color:gray
+.g1 {
+       color:gray;
+       font-style:italic
 }
 </style>
+<script src=static/js/jquery-1.10.2.min.js></script>
+<script src=static/js/jquery-ui-1.10.3.custom.min.js></script>
+<script>var arg = {
+       'font-size':'2em',
+       'transform':'rotate(10deg)'
+};</script>
 </head>
 <body>
 {% for x in coll %}
+       <article>
        {% if full(x['name']) == True %}
-       <p><a href=/{{x['name']}}> style=color:red>{{x['name']}}</a>
+       <a href=/{{x['name']}}> style=color:red>{{x['name']}}</a>
        {% else %}
-       <p><a href=/{{x['name']}}>{{x['name']}}</a>
+       <a href=/{{x['name']}}>{{x['name']}}</a>
        {% end %}
-       <span class=g1>タイトル:</span>{{x['title']}},<span class=g1>記事数:</span>{{x['count']}},<span class=g1>更新時刻:</span>{{x['date']}}
+       <span id={{x['name']}}><span class=g1>タイトル:</span>{{x['title']}}<span class=g1>,記事数:</span>{{x['count']}}<span class=g1>,更新時刻:</span>{{x['date']}}</span>
+       <script>
+       $(function(){
+               $('#{{x['name']}}').on('click',function(){
+                       $(this).css(arg);
+               });
+       });
+       </script></article>
+       <p>
 {% end %}
 <p><a href=/>もどる</a>
 <footer>PR リンク