mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-12 09:41:47 +02:00
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:
parent
5e3e751eb5
commit
a78dcd7fdb
1 changed files with 6 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue