Commit d8e9b83 1 parent d5e0d61 commit d8e9b83 Copy full SHA for d8e9b83
File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,18 @@ gd-ankisearch --field-name VocabKanji --word %GDWORD%
45
45
gd-ankisearch --deck-name Mining --word %GDWORD%
46
46
)EOF" ;
47
47
static constexpr std::string_view css_style = R"EOF( <style>
48
+ .gd-table-wrap {
49
+ max-width: 100%;
50
+ overflow-x: auto;
51
+ }
48
52
.gd-ankisearch-table {
49
53
font-family: arial, sans-serif;
50
54
border-collapse: collapse;
51
55
border-spacing: 0;
52
56
max-width: 100%;
53
57
width: 100%;
54
- display: block;
55
- overflow-x: auto;
56
58
overscroll-behavior-inline: contain;
59
+ margin: 0 auto;
57
60
}
58
61
.gd-ankisearch-table td,
59
62
.gd-ankisearch-table th {
@@ -311,6 +314,7 @@ void print_cards_info(search_params const& params)
311
314
return fmt::print (" No cards found.\n " );
312
315
}
313
316
auto const media_dir_path = fetch_media_dir_path ();
317
+ fmt::print (" <div class=\" gd-table-wrap\" >" );
314
318
fmt::print (" <table class=\" gd-ankisearch-table\" >\n " );
315
319
print_table_header (params);
316
320
for (auto const & card: get_cids_info (cids) | std::views::transform (card_json_to_obj)) {
@@ -328,7 +332,8 @@ void print_cards_info(search_params const& params)
328
332
fmt::print (" <td>{}</td>\n " , get_note_tags (card.nid ));
329
333
fmt::print (" </tr>\n " );
330
334
}
331
- fmt::print (" </table>\n " );
335
+ fmt::print (" </table>" );
336
+ fmt::print (" </div>\n " ); // gd-table-wrap
332
337
fmt::print (" {}\n " , css_style);
333
338
}
334
339
You can’t perform that action at this time.
0 commit comments