bike 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/LICENSE +19 -0
  2. data/README.rdoc +124 -0
  3. data/bin/bike +35 -0
  4. data/lib/_error.rb +14 -0
  5. data/lib/_field.rb +260 -0
  6. data/lib/_i18n.rb +144 -0
  7. data/lib/_parser.rb +256 -0
  8. data/lib/_path.rb +86 -0
  9. data/lib/_storage/_storage.rb +215 -0
  10. data/lib/_storage/file.rb +201 -0
  11. data/lib/_storage/sequel.rb +174 -0
  12. data/lib/_storage/temp.rb +73 -0
  13. data/lib/_widget/action_create.rb +23 -0
  14. data/lib/_widget/action_login.rb +22 -0
  15. data/lib/_widget/action_signup.rb +16 -0
  16. data/lib/_widget/action_update.rb +16 -0
  17. data/lib/_widget/crumb.rb +24 -0
  18. data/lib/_widget/done.rb +16 -0
  19. data/lib/_widget/login.rb +25 -0
  20. data/lib/_widget/me.rb +31 -0
  21. data/lib/_widget/message.rb +51 -0
  22. data/lib/_widget/navi.rb +88 -0
  23. data/lib/_widget/submit.rb +49 -0
  24. data/lib/_widget/view_ym.rb +77 -0
  25. data/lib/_workflow/_workflow.rb +89 -0
  26. data/lib/_workflow/attachment.rb +50 -0
  27. data/lib/_workflow/blog.rb +28 -0
  28. data/lib/_workflow/contact.rb +23 -0
  29. data/lib/_workflow/forum.rb +26 -0
  30. data/lib/_workflow/register.rb +39 -0
  31. data/lib/bike.rb +396 -0
  32. data/lib/meta/_meta.rb +20 -0
  33. data/lib/meta/group.rb +19 -0
  34. data/lib/meta/id.rb +59 -0
  35. data/lib/meta/owner.rb +21 -0
  36. data/lib/meta/timestamp.rb +118 -0
  37. data/lib/scalar/checkbox.rb +68 -0
  38. data/lib/scalar/file.rb +144 -0
  39. data/lib/scalar/img.rb +112 -0
  40. data/lib/scalar/password.rb +58 -0
  41. data/lib/scalar/radio.rb +47 -0
  42. data/lib/scalar/select.rb +47 -0
  43. data/lib/scalar/text.rb +38 -0
  44. data/lib/scalar/textarea.rb +35 -0
  45. data/lib/scalar/textarea_pre.rb +14 -0
  46. data/lib/scalar/textarea_wiki.rb +173 -0
  47. data/lib/set/_set.rb +196 -0
  48. data/lib/set/dynamic.rb +177 -0
  49. data/lib/set/static.rb +102 -0
  50. data/lib/set/static_folder.rb +96 -0
  51. data/locale/en/index.po +242 -0
  52. data/locale/index.pot +243 -0
  53. data/locale/ja/index.po +242 -0
  54. data/locale/lazy_parser.rb +54 -0
  55. data/skel/config.ru +27 -0
  56. data/skel/skin/_users/00000000_frank-avatar.jpg +0 -0
  57. data/skel/skin/_users/00000000_frank-avatar_small.jpg +0 -0
  58. data/skel/skin/_users/00000000_frank.yaml +12 -0
  59. data/skel/skin/_users/00000000_root-avatar.jpg +0 -0
  60. data/skel/skin/_users/00000000_root-avatar_small.jpg +0 -0
  61. data/skel/skin/_users/00000000_root.yaml +11 -0
  62. data/skel/skin/_users/css/users.css +21 -0
  63. data/skel/skin/_users/css/users.less +25 -0
  64. data/skel/skin/_users/done.html +42 -0
  65. data/skel/skin/_users/index.html +46 -0
  66. data/skel/skin/_users/index.yaml +3 -0
  67. data/skel/skin/_users/summary.html +40 -0
  68. data/skel/skin/css/base.css +93 -0
  69. data/skel/skin/css/base.less +139 -0
  70. data/skel/skin/css/coax.css +199 -0
  71. data/skel/skin/css/coax.less +244 -0
  72. data/skel/skin/examples/blog/20091214_0001.yaml +8 -0
  73. data/skel/skin/examples/blog/20100630_0001.yaml +8 -0
  74. data/skel/skin/examples/blog/20100630_0002.yaml +14 -0
  75. data/skel/skin/examples/blog/20100701_0001.yaml +8 -0
  76. data/skel/skin/examples/blog/20100701_0002-a-20100701_0001-f.jpg +0 -0
  77. data/skel/skin/examples/blog/20100701_0002-a-20100701_0001-f_small.jpg +0 -0
  78. data/skel/skin/examples/blog/20100701_0002.yaml +19 -0
  79. data/skel/skin/examples/blog/frank/20100701_0001.yaml +10 -0
  80. data/skel/skin/examples/blog/frank/index.yaml +4 -0
  81. data/skel/skin/examples/blog/index.html +51 -0
  82. data/skel/skin/examples/blog/rss.xml +18 -0
  83. data/skel/skin/examples/contact/20100701_0001-file.txt +1 -0
  84. data/skel/skin/examples/contact/20100701_0001.yaml +15 -0
  85. data/skel/skin/examples/contact/20100701_0002.yaml +8 -0
  86. data/skel/skin/examples/contact/20100701_0003.yaml +9 -0
  87. data/skel/skin/examples/contact/index.html +47 -0
  88. data/skel/skin/examples/contact/js/contact.js +13 -0
  89. data/skel/skin/examples/contact/summary.html +54 -0
  90. data/skel/skin/examples/forum/20100701_0001.yaml +41 -0
  91. data/skel/skin/examples/forum/20100701_0002.yaml +25 -0
  92. data/skel/skin/examples/forum/index.html +68 -0
  93. data/skel/skin/examples/forum/summary.html +47 -0
  94. data/skel/skin/examples/index.html +73 -0
  95. data/skel/skin/index.html +39 -0
  96. data/skel/skin/js/base.js +50 -0
  97. data/t/locale/de/index.po +19 -0
  98. data/t/locale/en-GB/index.po +25 -0
  99. data/t/locale/ja/index.po +30 -0
  100. data/t/skin/_users/00000000_test.yaml +3 -0
  101. data/t/skin/_users/index.html +13 -0
  102. data/t/skin/foo/20091120_0001.yaml +7 -0
  103. data/t/skin/foo/bar/20091120_0001.yaml +5 -0
  104. data/t/skin/foo/bar/index.yaml +5 -0
  105. data/t/skin/foo/baz/css/baz.css +1 -0
  106. data/t/skin/foo/css/foo.css +1 -0
  107. data/t/skin/foo/index.html +14 -0
  108. data/t/skin/foo/index.yaml +7 -0
  109. data/t/skin/foo/not_css/foo.css +1 -0
  110. data/t/skin/foo/qux/index.html +8 -0
  111. data/t/skin/foo/qux/moo/index.html +6 -0
  112. data/t/skin/foo/sub-20100306_0001.yaml +3 -0
  113. data/t/skin/index.yaml +3 -0
  114. data/t/skin/t_attachment/index.html +13 -0
  115. data/t/skin/t_contact/done.html +6 -0
  116. data/t/skin/t_contact/index.html +9 -0
  117. data/t/skin/t_file/index.html +16 -0
  118. data/t/skin/t_img/index.html +14 -0
  119. data/t/skin/t_img/test.jpg +0 -0
  120. data/t/skin/t_select/index.html +9 -0
  121. data/t/skin/t_store/index.html +9 -0
  122. data/t/skin/t_summary/20100326_0001.yaml +3 -0
  123. data/t/skin/t_summary/create.html +9 -0
  124. data/t/skin/t_summary/index.html +9 -0
  125. data/t/skin/t_summary/summary.html +9 -0
  126. data/t/t.rb +27 -0
  127. data/t/test_bike.rb +768 -0
  128. data/t/test_call.rb +1281 -0
  129. data/t/test_checkbox.rb +273 -0
  130. data/t/test_field.rb +330 -0
  131. data/t/test_file.rb +900 -0
  132. data/t/test_i18n.rb +325 -0
  133. data/t/test_id.rb +215 -0
  134. data/t/test_img.rb +328 -0
  135. data/t/test_meta.rb +57 -0
  136. data/t/test_parser.rb +1516 -0
  137. data/t/test_password.rb +188 -0
  138. data/t/test_radio.rb +226 -0
  139. data/t/test_role.rb +249 -0
  140. data/t/test_select.rb +182 -0
  141. data/t/test_set_complex.rb +527 -0
  142. data/t/test_set_dynamic.rb +1504 -0
  143. data/t/test_set_folder.rb +515 -0
  144. data/t/test_set_permit.rb +246 -0
  145. data/t/test_set_static.rb +468 -0
  146. data/t/test_storage.rb +915 -0
  147. data/t/test_text.rb +125 -0
  148. data/t/test_textarea.rb +138 -0
  149. data/t/test_timestamp.rb +473 -0
  150. data/t/test_workflow.rb +367 -0
  151. metadata +347 -0
@@ -0,0 +1,13 @@
1
+ $(document).ready(function() {
2
+ // just a makeshift :-p
3
+ // native support for various summaries (sum, avg, count, min and max) is on the way.
4
+ var sum = 0;
5
+ var num = 0;
6
+ $('.rating').each(
7
+ function(i){
8
+ sum += parseInt($(this).text());
9
+ num += 1;
10
+ }
11
+ );
12
+ if (num > 0) $('.rating-avg').text('Average: ' + parseInt(sum * 10 / num) / 10);
13
+ });
@@ -0,0 +1,54 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <title>@(label)</title>
10
+ <link rel="stylesheet" href="/css/base.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="/css/coax.css" type="text/css" media="screen" />
12
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
13
+ <script type="text/javascript" src="./js/contact.js"></script>
14
+ </head>
15
+
16
+ <body>
17
+ <div id="container">
18
+ <div id="header">
19
+ <h1><a href=".">@(label)</a></h1>
20
+ $(.crumb)
21
+ </div>
22
+
23
+ <div id="center" class="column">
24
+ <table id="main" class="app-contact summary" style="border: 1px solid black;">
25
+ <tr>
26
+ <th>Name</th>
27
+ <th>Email</th>
28
+ <th>Favorite</th>
29
+ <th>Rating</th>
30
+ </tr>
31
+ <tr class="model">
32
+ <td>$(name)</td>
33
+ <td>$(email)</td>
34
+ <td>$(favorite)</td>
35
+ <td class="rating">$(rating)</td>
36
+ </tr>
37
+ <tr>
38
+ <td></td>
39
+ <td></td>
40
+ <td></td>
41
+ <td class="rating-avg">Average: ???</td>
42
+ </tr>
43
+ </table>
44
+ </div>
45
+
46
+ <div id="right" class="column">
47
+ $(.me)
48
+ </div>
49
+
50
+ <div id="footer"></div>
51
+ </div>
52
+ </body>
53
+
54
+ </html>
@@ -0,0 +1,41 @@
1
+ ---
2
+ _owner: root
3
+ _timestamp:
4
+ created: 2010-07-01 15:05:37.204824 +09:00
5
+ published: 2010-07-01 15:05:37.204824 +09:00
6
+ updated: 2010-07-01 15:05:37.204824 +09:00
7
+ post: "consectetur adipiscing elit. Integer ornare varius sodales. Ut consequat odio a velit iaculis scelerisque. Mauris eget nibh lectus, sit amet condimentum ante. Vivamus at neque magna, sit amet ultricies nibh. Integer sed mi nec lacus scelerisque eleifend ut nec elit. Aliquam vitae nibh justo, eu pellentesque lorem. Vestibulum nisi leo, hendrerit nec placerat ac, pulvinar at erat. Cras justo purus, semper in elementum sed, vehicula bibendum arcu. Etiam quis lacus nec turpis luctus semper sit amet ut ipsum. Donec porta feugiat orci, in semper sapien aliquet sed. "
8
+ replies:
9
+ ? "20100701_0001"
10
+ :
11
+ _owner: frank
12
+ _timestamp:
13
+ created: 2010-07-01 15:06:06.811185 +09:00
14
+ published: 2010-07-01 15:06:06.811185 +09:00
15
+ updated: 2010-07-01 15:06:06.811185 +09:00
16
+ comment: "Pellentesque aliquet tortor in nibh scelerisque aliquet. In et sapien suscipit magna tristique egestas ac ac urna. Duis suscipit, tellus non ullamcorper eleifend, massa lorem ultrices massa, non vulputate purus lectus vitae est. Maecenas ut risus neque, malesuada volutpat felis. Maecenas euismod turpis in augue iaculis convallis."
17
+ ? "20100701_0002"
18
+ :
19
+ _owner: root
20
+ _timestamp:
21
+ created: 2010-07-01 15:06:31.375277 +09:00
22
+ published: 2010-07-01 15:06:31.375277 +09:00
23
+ updated: 2010-07-01 15:06:31.375277 +09:00
24
+ comment: "Etiam rhoncus, dui et convallis consequat, nisi lorem consectetur lorem, quis varius tortor mauris accumsan mauris. Cras pharetra aliquam tellus, ut dignissim nibh venenatis sed."
25
+ ? "20100701_0003"
26
+ :
27
+ _owner: carl
28
+ _timestamp:
29
+ created: 2010-07-01 15:06:59.319917 +09:00
30
+ published: 2010-07-01 15:06:59.319917 +09:00
31
+ updated: 2010-07-01 15:06:59.319917 +09:00
32
+ comment: "Aliquam quis lacus id dui congue vehicula. Phasellus dignissim ullamcorper arcu, ac pretium lorem scelerisque sit amet. Praesent eu neque libero. Morbi sodales convallis tellus sed sagittis. Ut consectetur, eros eget volutpat ultrices, nisl augue malesuada dui, hendrerit cursus orci urna a felis."
33
+ ? "20100701_0004"
34
+ :
35
+ _owner: root
36
+ _timestamp:
37
+ created: 2010-07-01 16:56:17.474677 +09:00
38
+ published: 2010-07-01 16:56:17.474677 +09:00
39
+ updated: 2010-07-01 16:56:17.474677 +09:00
40
+ comment: "Ut ante arcu, consectetur nec laoreet ut, lacinia quis nisi."
41
+ subject: "Lorem ipsum"
@@ -0,0 +1,25 @@
1
+ ---
2
+ _owner: frank
3
+ _timestamp:
4
+ created: 2010-07-01 15:08:51.596034 +09:00
5
+ published: 2010-07-01 15:08:51.596034 +09:00
6
+ updated: 2010-07-01 16:16:48.149488 +09:00
7
+ post: "Suspendisse ut dui in velit scelerisque condimentum in id lectus. Aenean ut dolor ut sapien rhoncus faucibus. Morbi sed dictum velit. Duis mi erat, interdum quis tristique et, varius id urna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos."
8
+ replies:
9
+ ? "20100701_0001"
10
+ :
11
+ _owner: carl
12
+ _timestamp:
13
+ created: 2010-07-01 15:09:16.205333 +09:00
14
+ published: 2010-07-01 15:09:16.205333 +09:00
15
+ updated: 2010-07-01 15:09:16.205333 +09:00
16
+ comment: "Nullam id felis pharetra mi posuere luctus et et nisi. Pellentesque facilisis mi laoreet ligula tristique et ultricies sapien consectetur. Duis rhoncus ullamcorper nisi at hendrerit. "
17
+ ? "20100701_0002"
18
+ :
19
+ _owner: don
20
+ _timestamp:
21
+ created: 2010-07-01 15:09:44.280047 +09:00
22
+ published: 2010-07-01 15:09:44.280047 +09:00
23
+ updated: 2010-07-01 15:09:44.280047 +09:00
24
+ comment: "Etiam rhoncus, dui et convallis consequat, nisi lorem consectetur lorem, quis varius tortor mauris accumsan mauris."
25
+ subject: "Etiam posuere placerat orci in hendrerit"
@@ -0,0 +1,68 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <meta name="bike-label" content="Forum" />
10
+ <title>@(label)</title>
11
+ <link rel="stylesheet" href="/css/base.css" type="text/css" media="screen" />
12
+ <link rel="stylesheet" href="/css/coax.css" type="text/css" media="screen" />
13
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
14
+ <script type="text/javascript" src="/js/base.js"></script>
15
+ </head>
16
+
17
+ <body>
18
+ <div id="container">
19
+ <div id="header">
20
+ <h1><a href=".">@(label)</a></h1>
21
+ $(.crumb)
22
+ </div>
23
+
24
+ <div id="center" class="column">
25
+ <div id="main" class="app-forum">
26
+ <!-- 1..10 may_preview desc -->
27
+ <table class="forum post">
28
+ <tr>
29
+ <th>
30
+ <div>$(_owner)</div>
31
+ <div>$(_timestamp)</div>
32
+ </th>
33
+ <td>
34
+ <div class="subject">$(subject = text 1..64)</div>
35
+ $(post = textarea 60*6 1..4096)
36
+ $(.action_update)
37
+ </td>
38
+ </tr>
39
+ </table>
40
+ <table id="replies" class="app-forum forum reply">
41
+ <!-- 1..5 -->
42
+ <tr title="reply,replies">
43
+ <th>
44
+ $(_owner)<br/>
45
+ $(_timestamp)
46
+ </th>
47
+ <td>
48
+ $(comment = textarea 60*6 1..4096)
49
+ $(.action_update)
50
+ </td>
51
+ <tr>
52
+ </table>
53
+ $(replies.action_create)
54
+ </div>
55
+ </div>
56
+
57
+ <div id="right" class="column">
58
+ $(.action_signup)
59
+ $(.me)
60
+ $(main.action_create)
61
+ $(main.view_ym)
62
+ </div>
63
+
64
+ <div id="footer"></div>
65
+ </div>
66
+ </body>
67
+
68
+ </html>
@@ -0,0 +1,47 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <title>@(label)</title>
10
+ <link rel="stylesheet" href="/css/base.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="/css/coax.css" type="text/css" media="screen" />
12
+ </head>
13
+
14
+ <body>
15
+ <div id="container">
16
+ <div id="header">
17
+ <h1><a href=".">@(label)</a></h1>
18
+ $(.crumb)
19
+ </div>
20
+
21
+ <div id="center" class="column">
22
+ <table id="main" class="app-contact summary" style="border: 1px solid black;">
23
+ <tr>
24
+ <th>Subject</th>
25
+ <th>Author</th>
26
+ <th>Posted at</th>
27
+ </tr>
28
+ <tr class="model">
29
+ <td>$(subject)</td>
30
+ <td>$(_owner)</td>
31
+ <td>$(_timestamp)</td>
32
+ </tr>
33
+ </table>
34
+ </div>
35
+
36
+ <div id="right" class="column">
37
+ $(.action_signup)
38
+ $(.me)
39
+ $(main.action_create)
40
+ $(main.view_ym)
41
+ </div>
42
+
43
+ <div id="footer"></div>
44
+ </div>
45
+ </body>
46
+
47
+ </html>
@@ -0,0 +1,73 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="_(en)" lang="_(en)">
6
+
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <meta name="bike-label" content="Examples" />
10
+ <title>@(label)</title>
11
+ <link rel="stylesheet" href="/css/base.css" type="text/css" media="screen" />
12
+ <link rel="stylesheet" href="/css/coax.css" type="text/css" media="screen" />
13
+ </head>
14
+
15
+ <body>
16
+ <div id="container">
17
+ <div id="header">
18
+ <h1><a href=".">@(label)</a></h1>
19
+ $(.crumb)
20
+ </div>
21
+
22
+ <div id="center" class="column">
23
+ <h2>@(label)</h2>
24
+ <p>
25
+ This directory contains some sample apps to show you how good Bike works.
26
+ When you don't need them any more, you can just remove skin/examples/ directory and they will be gone.
27
+ </p>
28
+ <p>
29
+ You may have to login to try some features of the apps. By default, there are two users.
30
+ The first user is "root", the admin of the whole Bike app.
31
+ The second user is "frank", who has no special privilege.
32
+ Their initial passwords are same as their names (e.g. "root" for root, "frank" for frank).
33
+ And of course, you can create your own account at <a href="../_users/create.html">here</a>.
34
+ </p>
35
+ <p>
36
+ The data are stored in plain YAML files under data/examples/ by default. You can store the data on any RDB by fiddling config.ru.
37
+ </p>
38
+ <dl>
39
+ <dt><a href="./blog/">Blog</a></dt>
40
+ <dd>
41
+ The admin (root) can post / update / delete entries and everybody can read them.
42
+ Typical features such as monthly archives or syndication by RSS are provided.
43
+ You have to login as "root" to post new articles.
44
+ </dd>
45
+ <dt><a href="./blog/frank/">Frank's Blog</a></dt>
46
+ <dd>
47
+ This is an example of inheritance.
48
+ By simply making an empty sub-directory (blog/frank/), all HTMLs are inherited from the upper directory (blog/).
49
+ Then, blog/frank/index.yaml overrides the label ("Frank's Blog") and the admin (frank).
50
+ </dd>
51
+ <dt><a href="./contact/">Contact Form</a></dt>
52
+ <dd>
53
+ This is an "everybody -> admin" type app.
54
+ Everybody other than root can post this form and only root can see the posted result.
55
+ The index.html is a good sample of various items such like radio, select, checkbox etc.
56
+ </dd>
57
+ <dt><a href="./forum/">Forum</a></dt>
58
+ <dd>
59
+ This is an example of a nested model.
60
+ The app will have many posts, and each post will have many comments.
61
+ Everybody who logged in can create a new post, or reply to a existing post.
62
+ </dd>
63
+ </dl>
64
+ </div>
65
+
66
+ <div id="right" class="column">
67
+ </div>
68
+
69
+ <div id="footer"></div>
70
+ </div>
71
+ </body>
72
+
73
+ </html>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="_(en)" lang="_(en)">
6
+
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <meta name="bike-label" content="Home" />
10
+ <title>_(It works!)</title>
11
+ <link rel="stylesheet" href="/css/base.css" type="text/css" media="screen" />
12
+ <link rel="stylesheet" href="/css/coax.css" type="text/css" media="screen" />
13
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
14
+ <script type="text/javascript" src="/js/base.js"></script>
15
+ </head>
16
+
17
+ <body>
18
+ <div id="container">
19
+ <div id="header">
20
+ <h1><a href=".">_(It works!)</a></h1>
21
+ $(.crumb)
22
+ </div>
23
+
24
+ <div id="center" class="column">
25
+ <h2>_(Welcome!)</h2>
26
+ <p>
27
+ This is your homepage of the Bike app.<br />
28
+ You can play with <a href="./examples/">the examples</a> before making your first Bike app.
29
+ </p>
30
+ </div>
31
+
32
+ <div id="right" class="column">
33
+ </div>
34
+
35
+ <div id="footer"></div>
36
+ </div>
37
+ </body>
38
+
39
+ </html>
@@ -0,0 +1,50 @@
1
+ $(document).ready(function() {
2
+ $('span.error').hover(
3
+ function(){
4
+ $('.error_message', this).fadeIn(150);
5
+ },
6
+ function(){
7
+ if ($(this).is(':not(.focused)')) $('.error_message', this).fadeOut(50);
8
+ }
9
+ );
10
+
11
+ $(':input', $('span.error')).focus(
12
+ function(){
13
+ var d = $(this).closest('span.error');
14
+ d.addClass('focused');
15
+ $('.error_message', d).fadeIn(150);
16
+ }
17
+ ).blur(
18
+ function(){
19
+ var d = $(this).closest('span.error');
20
+ d.removeClass('focused');
21
+ $('.error_message', d).fadeOut(50);
22
+ }
23
+ ).change(
24
+ function(){
25
+ var d = $(this).closest('span.error');
26
+ d.removeClass('error');
27
+ d.removeClass('focused');
28
+ $('.error_message', d).hide();
29
+ }
30
+ );
31
+
32
+ $('.error_message').hide().css({
33
+ 'color': 'white',
34
+ 'background': 'red',
35
+ 'opacity': '0.9',
36
+ 'position': 'absolute',
37
+ 'margin-left': '0',
38
+ 'margin-top': '2px',
39
+ 'padding': '.3em 1em .3em 1em',
40
+ '-moz-border-radius': '.3em',
41
+ '-webkit-border-radius': '.3em'
42
+ });
43
+
44
+ if ($('span.error').length > 0) {
45
+ $(':input:enabled:first', $('span.error:first')).focus().select();
46
+ }
47
+ else {
48
+ $(':input:enabled:first').focus().select();
49
+ }
50
+ });
@@ -0,0 +1,19 @@
1
+ # just a test.
2
+ # Copyright (C) 2010 Akira FUNAI
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR Akira FUNAI, 2010.
5
+ #
6
+
7
+ "Project-Id-Version: 0.01\n"
8
+ "POT-Creation-Date: 2010-05-06 15:11+0900\n"
9
+ "PO-Revision-Date: 2010-05-06 15:11+0900\n"
10
+ "Last-Translator: Akira FUNAI <akira@funai.com>\n"
11
+ "Language-Team: none <nobody@example.com>\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+
17
+ #: t.rb:1234
18
+ msgid "malformed input."
19
+ msgstr "Fehlerhafte Eingabe."
@@ -0,0 +1,25 @@
1
+ # just a test.
2
+ # Copyright (C) 2010 Akira FUNAI
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR Akira FUNAI, 2010.
5
+ #
6
+
7
+ "Project-Id-Version: 0.01\n"
8
+ "POT-Creation-Date: 2010-05-06 15:11+0900\n"
9
+ "PO-Revision-Date: 2010-05-06 15:11+0900\n"
10
+ "Last-Translator: Akira FUNAI <akira@funai.com>\n"
11
+ "Language-Team: none <nobody@example.com>\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+
17
+ #: t.rb:1234
18
+ msgid "color"
19
+ msgstr "colour"
20
+
21
+ #: t.rb:2345
22
+ msgid "one color"
23
+ msgid_plural "%{n} colors"
24
+ msgstr[0] "one colour"
25
+ msgstr[1] "%{n} colours"