misc: do not generate unused png icon variants (#72513) #3

Merged
fpeters merged 1 commits from wip/72513-stop-generating-unused-png into main 2023-04-04 17:59:16 +02:00
2 changed files with 3 additions and 11 deletions

View File

@ -1076,12 +1076,10 @@ ul#sidepage-menu li a {
border-radius: 2px; border-radius: 2px;
} }
$string-color: str-slice($primary-color + '', 2);
$appicons: add, agendas, announces, bankcard, book, calendar, cards, categories, clock, counter, data, facturier, forms, gis, grid, home, identity-management, lingo, mail, management, organizational-units, passerelle, password, phone, portal, portal-agent, porte-doc, roles, security, services, settings, statistics, studio, submission, system, texts, theme, users, workflows; $appicons: add, agendas, announces, bankcard, book, calendar, cards, categories, clock, counter, data, facturier, forms, gis, grid, home, identity-management, lingo, mail, management, organizational-units, passerelle, password, phone, portal, portal-agent, porte-doc, roles, security, services, settings, statistics, studio, submission, system, texts, theme, users, workflows;
@each $appicon in $appicons { @each $appicon in $appicons {
ul#sidepage-menu li a.icon-#{$appicon} { background-image: url(icons/#{$appicon}.small.#{$string-color}.png); } ul#sidepage-menu li a.icon-#{$appicon} { background-image: url(icons/#{$appicon}.small.png); }
ul.apps li.icon-#{$appicon} a { background-image: url(icons/#{$appicon}.large.png); } ul.apps li.icon-#{$appicon} a { background-image: url(icons/#{$appicon}.large.png); }
ul.apps li.icon-#{$appicon} a:hover { background-image: url(icons/#{$appicon}.large-hover.png); } ul.apps li.icon-#{$appicon} a:hover { background-image: url(icons/#{$appicon}.large-hover.png); }
} }

View File

@ -142,19 +142,13 @@ class build_icons(Command):
if not os.path.exists(destpath): if not os.path.exists(destpath):
os.mkdir(destpath) os.mkdir(destpath)
variants_applications = { variants_applications = {
'small': {'colour': 'e7e7e7', 'width': '40'}, 'small': {'colour': '386ede', 'width': '40'},
'small.white': {'colour': 'ffffff', 'width': '40'},
'small.386ede': {'colour': '386ede', 'width': '40'},
'small.ff375e': {'colour': 'ff375e', 'width': '40'},
'small.6f2b92': {'colour': '6f2b92', 'width': '40'},
'large': {'colour': 'e7e7e7', 'width': '80'}, 'large': {'colour': 'e7e7e7', 'width': '80'},
'large-hover': {'colour': 'bebebe', 'width': '80'}, 'large-hover': {'colour': 'bebebe', 'width': '80'},
} }
variants_actions = { variants_actions = {
'small': {'colour': '386ede', 'width': '40'},
'small.white': {'colour': 'ffffff', 'width': '40'}, 'small.white': {'colour': 'ffffff', 'width': '40'},
'small.386ede': {'colour': '386ede', 'width': '40'},
'small.ff375e': {'colour': 'ff375e', 'width': '40'},
'small.6f2b92': {'colour': '6f2b92', 'width': '40'},
'hover': {'colour': '2b2b2b', 'width': '40'}, 'hover': {'colour': '2b2b2b', 'width': '40'},
} }
for basepath, dirnames, filenames in os.walk('icons'): for basepath, dirnames, filenames in os.walk('icons'):