mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
doc: wikiparser: Show icons with full size
Setting the height to 26 in the XML file results in HTML getting a 16px size. 16x16 is original size of all the icons. This was first proposed with a size of 20 in the original wikiparser MR. Tests: - Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox. Confirm by diffing with manual generated without the code changes. - Open all affected pages and the full manual page and confirm that images sizes are 16px (original size). - Check all affected pages and the full manual page in FreedomBox interface and confirm that images sizes are 16px (original size). - Check all affected sections in the generated PDF. - Repeat tests for English and Spanish manuals. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
57c60d9ac6
commit
04a0fd7b78
@ -741,7 +741,7 @@ def parse_text(line, context=None, parse_links=True):
|
||||
target = f'{ICONS_DIR}/{WIKI_ICONS[line.strip()]}.png'
|
||||
result.append(
|
||||
EmbeddedAttachment(target, [PlainText(icon_text)],
|
||||
'depth=16,width=16'))
|
||||
'height=26'))
|
||||
line = line.lstrip().replace(icon_text, '', 1)
|
||||
break
|
||||
|
||||
@ -1079,22 +1079,22 @@ PlainText(' ')])]
|
||||
|
||||
>>> parse_wiki('/!\\\\')
|
||||
[Paragraph([EmbeddedAttachment('icons/alert.png', \
|
||||
[PlainText('/!\\\\')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('/!\\\\')], 'height=26'), PlainText(' ')])]
|
||||
>>> parse_wiki('(./)')
|
||||
[Paragraph([EmbeddedAttachment('icons/checkmark.png', \
|
||||
[PlainText('(./)')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('(./)')], 'height=26'), PlainText(' ')])]
|
||||
>>> parse_wiki('{X}')
|
||||
[Paragraph([EmbeddedAttachment('icons/icon-error.png', \
|
||||
[PlainText('{X}')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('{X}')], 'height=26'), PlainText(' ')])]
|
||||
>>> parse_wiki('{i}')
|
||||
[Paragraph([EmbeddedAttachment('icons/icon-info.png', \
|
||||
[PlainText('{i}')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('{i}')], 'height=26'), PlainText(' ')])]
|
||||
>>> parse_wiki('{o}')
|
||||
[Paragraph([EmbeddedAttachment('icons/star_off.png', \
|
||||
[PlainText('{o}')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('{o}')], 'height=26'), PlainText(' ')])]
|
||||
>>> parse_wiki('{*}')
|
||||
[Paragraph([EmbeddedAttachment('icons/star_on.png', \
|
||||
[PlainText('{*}')], 'depth=16,width=16'), PlainText(' ')])]
|
||||
[PlainText('{*}')], 'height=26'), PlainText(' ')])]
|
||||
|
||||
>>> parse_wiki('{{attachment:cockpit-enable.png}}')
|
||||
[Paragraph([EmbeddedAttachment('cockpit-enable.png', \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user