diff options
Diffstat (limited to 'megapixels/app/site')
| -rw-r--r-- | megapixels/app/site/parser.py | 30 |
1 files changed, 29 insertions, 1 deletions
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 @@ -163,6 +163,35 @@ def intro_section(metadata, s3_path): """ section = "<section class='intro_section' style='background-image: url({})'>".format(s3_path + metadata['image']) + # section += "<div class='inner'>" + + # 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'], "<span style='color: {}'>{}</span>".format(metadata['color'], metadata['title']), 1) + # section += "<div class='hero_desc'><span class='bgpad'>{}</span></div>".format(desc, desc) + + # if 'subdesc' in metadata: + # subdesc = markdown(metadata['subdesc']).replace('<p>', '').replace('</p>', '') + # section += "<div class='hero_subdesc'><span class='bgpad'>{}</span></div>".format(subdesc, subdesc) + + # section += "</div>" + section += "</section>" + + if 'caption' in metadata: + section += "<section><div class='image'><div class='intro-caption caption'>{}</div></div></section>".format(metadata['caption']) + + return section + + +def intro_section_v1(metadata, s3_path): + """ + Build the intro section for datasets + """ + + section = "<section class='intro_section' style='background-image: url({})'>".format(s3_path + metadata['image']) section += "<div class='inner'>" parts = [] @@ -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 |
