Implemented responsive tables, removed bootstrap

No need for all of bootstrap since we only need to style a few elements.

Implemented responsive table pattern from here:
https://css-tricks.com/responsive-data-tables/

Refs #16
This commit is contained in:
Simon Willison 2017-11-10 21:55:50 -08:00
commit 7d81083d40
8 changed files with 112 additions and 57 deletions

View file

@ -1,6 +1,7 @@
from contextlib import contextmanager
import base64
import json
import re
import sqlite3
import time
import urllib
@ -107,3 +108,10 @@ def path_with_added_args(request, args):
current = request.raw_args.copy()
current.update(args)
return request.path + '?' + urllib.parse.urlencode(current)
_css_re = re.compile(r'''['"\n\\]''')
def escape_css_string(s):
return _css_re.sub(lambda m: '\\{:X}'.format(ord(m.group())), s)