Skip to content

Commit

Permalink
Improve created Contributors web-page
Browse files Browse the repository at this point in the history
[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 <[email protected]>
  • Loading branch information
Finii committed Nov 1, 2023
1 parent 5e3e751 commit a78dcd7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/scripts/update-all-contributors-website.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@

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]
Expand Down

0 comments on commit a78dcd7

Please sign in to comment.