File tree Expand file tree Collapse file tree 2 files changed +52
-34
lines changed
Expand file tree Collapse file tree 2 files changed +52
-34
lines changed Original file line number Diff line number Diff line change 11
2- div.instapaper_ignore.readability-extra
3- h2.facebox-header
4- Keyboard shortcuts
5- small
6- button.btn-link.js-see-all-keyboard-shortcuts type="button"
7- (Show all)
8- div.columns
9- -py
10- columns = zip(*[iter(keyboards)] * 2)
11- -for index, column in enumerate(columns)
12- div.column.one-half
13- table.keyboard-mappings
14- -for block_info, keyboard in column
15- -py
16- attrs = {'class': 'js-hidden-pane'} if index else {}
17- tbody**attrs
18- tr
19- th
20- th
21- ${block_info}
22- -for dbds, key_info in keyboard
23- -py
24- keys = dbds.split()
25- tr
26- td.keys
27- -for key in keys
28- - if key != '/':
29- kbd
30- ${key}
31- -else
32- /
33- td
34- ${key_info}
2+ < div class ="instapaper_ignore readability-extra ">
3+ < h2 class ="facebox-header ">
4+ Keyboard shortcuts
5+ < small >
6+ < button class ="btn-link js-see-all-keyboard-shortcuts " type ="button ">
7+ (Show all)
8+ </ button >
9+ </ small >
10+ </ h2 >
11+ < div class ="columns ">
12+ {% for column in columns %}
13+ < div class ="column one-half ">
14+ < table class ="keyboard-mappings ">
15+ {% for block_info, keyboard in column %}
16+ {% if loop.index0 %}
17+ {% set class="js-hidden-pane" %}
18+ {% else %}
19+ {% set class="" %}
20+ {% endif %}
21+
22+ < tbody class ="{{ class }} ">
23+ < tr >
24+ < th > </ th >
25+ < th > {{ block_info }}</ th >
26+ {% for dbds, key_info in keyboard %}
27+ <!-- keys = dbds.split() -->
28+ < tr >
29+ < td class ="keys ">
30+ {% for key in dbds.split() %}
31+ {% if key != '/' %}
32+ < kbd > {{ key }}</ kbd >
33+ {% else %}
34+ /
35+ {% endif %}
36+ {% endfor %}
37+ </ td >
38+ < td >
39+ {{ key_info }}
40+ </ td >
41+ </ tr >
42+ {% endfor %}
43+ </ tr >
44+ </ tbody >
45+ {% endfor %}
46+ </ table >
47+ </ div >
48+ {% endfor %}
49+ </ div >
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ def get(self):
1818 keyboards = KEYBOARD_URL_MAPS ['default' ]
1919 if url_pattern in KEYBOARD_URL_MAPS :
2020 keyboards += KEYBOARD_URL_MAPS [url_pattern ]
21- return render_template ('widgets/keyboard.html' , keyboards = keyboards )
21+ columns = zip (* [iter (keyboards )] * 2 )
22+ return render_template (
23+ 'widgets/keyboard.html' , columns = columns
24+ )
2225
2326
2427bp .add_url_rule ('/' , view_func = KeyboardView .as_view ('keyboard' ))
You can’t perform that action at this time.
0 commit comments