From 36642f6e14edf8e7da0f7506e3ca5bb59f71873a Mon Sep 17 00:00:00 2001 From: Castro0o Date: Fri, 27 Mar 2020 09:30:43 +0100 Subject: [PATCH] relative image path --- query2html.py | 3 +-- static/style.css | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/query2html.py b/query2html.py index 15749de..8a81056 100644 --- a/query2html.py +++ b/query2html.py @@ -54,7 +54,6 @@ if args.dry is True: site = Site(host=args.host, path=args.path) wd = os.path.dirname(os.path.abspath(__file__)) # working directory -imgdir = os.path.join(wd, 'images') imgsjson_fn = os.path.join(wd, 'images.json') with open(imgsjson_fn, 'r') as imgsjson_file: images_info = json.load(imgsjson_file) @@ -90,7 +89,7 @@ for answer in site.ask(query): print(Colors.GREEN, 'run python3 download_imgs.py to fix the issue', Colors.ENDC) sys.exit() - img_local = os.path.join(imgdir, img_info.get('filename')) + img_local = os.path.join('../images', img_info.get('filename')) # TODO: look into the template structure of images : columns and rows diff --git a/static/style.css b/static/style.css index f42e415..662381e 100644 --- a/static/style.css +++ b/static/style.css @@ -6,6 +6,6 @@ body { background-color: #aaa4a0; } -div.row {display: inline;} -div.column { display: inline;} -div.column img{ width:25%;} \ No newline at end of file +div.row {display: inline; } +div.column { display: inline; } +div.column img{ width:24%; } \ No newline at end of file