diff options
-rwxr-xr-x | library_info_cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library_info_cli.py b/library_info_cli.py index 6ffaf21..5416662 100755 --- a/library_info_cli.py +++ b/library_info_cli.py @@ -93,7 +93,8 @@ def html(checkouts, reservations): prn("<span class='eighty'>Last modified: " + now.strftime("%FT%TZ") + "</span>\n") prn("<h2>Checkouts</h2>\n") if len(checkouts): - prn("<table class='display' id='checkouts'>\n") + # for some reason, DataTables will let a table resize with browser window resize only if the table object itself has the style. A css entry for "table" does not affect DataTables. + prn("<table style='width: 100%;' class='display' id='checkouts'>\n") prn(f"<thead><tr><th>Patron</th><th>barcode</th><th>due</th><th>format</th><th>cover</th><th>Title</th></tr></thead>\n") prn("<tbody>\n") for i in checkouts: @@ -117,7 +118,7 @@ def html(checkouts, reservations): prn(f"No checkouts.\n") prn("<h2>Reservations</h2>\n") if len(reservations): - prn(f"<table class='display' id='reservations'>\n") + prn(f"<table style='width: 100%;' class='display' id='reservations'>\n") prn(f"<thead><tr><th>Patron</th><th>date placed</th><th>location</th><th>position</th><th>status</th><th>cover</th><th>title</th></thead>\n") prn("<tbody>\n") for i in reservations: |