Improve created Contributors web-page

[why]
When viewed on a small screens the contributors page on the gh-pages
looks not very nice and overflows.

[how]
Instead of a table with a predefined number of rows we just use blocks
in an inline context that allows the line break to adjust to the
available width.

Fixes: #1399

Reported-by: Vitthal Gund <@VitthalGund>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-11-01 16:54:38 +01:00
parent 5e3e751eb5
commit a78dcd7fdb

View file

@ -26,8 +26,13 @@ cC_end = contributorContents.rfind(ending_text) + len(ending_text)
transformedContributorContents = contributorContents[cC_start:cC_end]
print('* improving table')
print('* replacing table')
transformedContributorContents = transformedContributorContents.replace('<img src=', '<img class="lzy_img" data-src=')
transformedContributorContents = re.sub(' *</?table>', '', transformedContributorContents, flags=re.IGNORECASE)
transformedContributorContents = re.sub(' *</?tbody>', '', transformedContributorContents, flags=re.IGNORECASE)
transformedContributorContents = re.sub(' *</?tr>', '', transformedContributorContents, flags=re.IGNORECASE)
transformedContributorContents = re.sub(' *</td>', '</span>', transformedContributorContents, flags=re.IGNORECASE)
transformedContributorContents = re.sub(' *<td[^>]*>', '<span style="display: inline-block; width: 130px;">', transformedContributorContents, flags=re.IGNORECASE)
print('* final out')
webContributorContents = (webContributorContents[:wCC_start]