corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | --- |
2 | layout: default |
||
3 | title: pages.extensions.title |
||
4 | slug: extensions |
||
5 | lead: pages.extensions.lead |
||
6 | --- |
||
7 | |||
8 | <style> |
||
9 | .name { |
||
10 | font-weight: bold; |
||
11 | font-size: 200%; |
||
12 | margin-top: -20px; |
||
13 | } |
||
14 | .card-view { |
||
15 | margin: 15px 0; |
||
16 | } |
||
17 | </style> |
||
18 | |||
19 | # Extensions list [](https://github.com/wenzhixin/bootstrap-table/issues) |
||
20 | |||
21 | <div class="row"> |
||
22 | <div class="col-md-6"> |
||
23 | <table data-toggle="table" |
||
24 | data-url="../data/extensions.json" |
||
25 | data-card-view="true" |
||
26 | data-response-handler="responseHandler0"> |
||
27 | <thead> |
||
28 | <tr> |
||
29 | <th data-field="name" data-formatter="nameFormatter"></th> |
||
30 | <th data-field="version">Version</th> |
||
31 | <th data-field="plugins" data-formatter="pluginsFormatter">Plugins</th> |
||
32 | <th data-field="description">Description</th> |
||
33 | <th data-field="button" data-formatter="buttonFormatter"></th> |
||
34 | </tr> |
||
35 | </thead> |
||
36 | </table> |
||
37 | </div> |
||
38 | <div class="col-md-6"> |
||
39 | <table data-toggle="table" |
||
40 | data-url="../data/extensions.json" |
||
41 | data-card-view="true" |
||
42 | data-response-handler="responseHandler1"> |
||
43 | <thead> |
||
44 | <tr> |
||
45 | <th data-field="name" data-formatter="nameFormatter"></th> |
||
46 | <th data-field="version">Version</th> |
||
47 | <th data-field="plugins" data-formatter="pluginsFormatter">Plugins</th> |
||
48 | <th data-field="description">Description</th> |
||
49 | <th data-field="button" data-formatter="buttonFormatter"></th> |
||
50 | </tr> |
||
51 | </thead> |
||
52 | </table> |
||
53 | </div> |
||
54 | </div> |
||
55 | |||
56 | <script> |
||
57 | function nameFormatter(v, row) { |
||
58 | return [ |
||
59 | '<div class="name">', |
||
60 | '<a title="' + row.author.name + '" href="https://github.com/' + row.author.name + '" target="_blank">', |
||
61 | '<img src="' + row.author.image + '" width="64"> ', |
||
62 | '</a>', |
||
63 | row.name, |
||
64 | '</div>' |
||
65 | ].join(''); |
||
66 | } |
||
67 | function pluginsFormatter(plugins) { |
||
68 | var html = []; |
||
69 | $.each(plugins, function (i, plugin) { |
||
70 | html.push('<a href="' + plugin.url + '" target="_blank">' + plugin.name + '</a>'); |
||
71 | }); |
||
72 | return html.join(', '); |
||
73 | } |
||
74 | function buttonFormatter(value, row) { |
||
75 | return [ |
||
76 | '<a class="btn btn-primary" href="' + row.url + '" target="_blank">Home</a> ', |
||
77 | '<a class="btn btn-default" href="' + row.example + '" target="_blank">Example</a>' |
||
78 | ].join(''); |
||
79 | } |
||
80 | function responseHandler0(res) { |
||
81 | return responseHandler(res, 0); |
||
82 | } |
||
83 | function responseHandler1(res) { |
||
84 | return responseHandler(res, 1); |
||
85 | } |
||
86 | function responseHandler(res, n) { |
||
87 | return $.grep(res, function (item, i) { |
||
88 | return i % 2 === n; |
||
89 | }); |
||
90 | } |
||
91 | </script> |