diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-02 16:58:13 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-02 16:58:13 +0100 |
| commit | 50cfe8e9950a473ae7c44abbb46be4c72fa36786 (patch) | |
| tree | 840c6bf4601b080422c3186b974e4d491f137629 /megapixels/app | |
| parent | 49aacc3d3f1cb9dba89dbc7296e8b63378883425 (diff) | |
colorize the first instance of the database name in the header
Diffstat (limited to 'megapixels/app')
| -rw-r--r-- | megapixels/app/site/parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/megapixels/app/site/parser.py b/megapixels/app/site/parser.py index ad4256ad..f7d0128e 100644 --- a/megapixels/app/site/parser.py +++ b/megapixels/app/site/parser.py @@ -125,8 +125,9 @@ def intro_section(metadata, s3_path): 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'])) + desc = desc.replace(metadata['title'], "<span style='color: {}'>{}</span>".format(metadata['color'], metadata['title']), 1) section += "<div class='hero_desc'><span>{}</span></div>".format(desc, desc) if 'subdesc' in metadata: |
