From 27340ac4cd43f8eec7414495b541a65566ae2656 Mon Sep 17 00:00:00 2001 From: adamhrv Date: Tue, 8 Oct 2019 16:02:47 +0200 Subject: update site, white --- megapixels/app/site/parser.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'megapixels/app/site') diff --git a/megapixels/app/site/parser.py b/megapixels/app/site/parser.py index 3700efd1..6ab8c700 100644 --- a/megapixels/app/site/parser.py +++ b/megapixels/app/site/parser.py @@ -162,6 +162,35 @@ def intro_section(metadata, s3_path): Build the intro section for datasets """ + section = "
".format(s3_path + metadata['image']) + # section += "
" + + # parts = [] + # if 'desc' in metadata: + # desc = metadata['desc'] + # # colorize the first instance of the database name in the header + # if 'color' in metadata and metadata['title'] in desc: + # desc = desc.replace(metadata['title'], "{}".format(metadata['color'], metadata['title']), 1) + # section += "
{}
".format(desc, desc) + + # if 'subdesc' in metadata: + # subdesc = markdown(metadata['subdesc']).replace('

', '').replace('

', '') + # section += "
{}
".format(subdesc, subdesc) + + # section += "
" + section += "
" + + if 'caption' in metadata: + section += "
{}
".format(metadata['caption']) + + return section + + +def intro_section_v1(metadata, s3_path): + """ + Build the intro section for datasets + """ + section = "
".format(s3_path + metadata['image']) section += "
" @@ -185,7 +214,6 @@ def intro_section(metadata, s3_path): return section - def fix_images(lines, s3_path): """ do our own transformation of the markdown around images to handle wide images etc -- cgit v1.2.3-70-g09d2