Add mobile tape shadows and center bank heading
showcase/deploy Live at https://showcase.andrefiedler.de/2608_BuB/
showcase/deploy Live at https://showcase.andrefiedler.de/2608_BuB/
This commit is contained in:
@@ -91,9 +91,26 @@ for width in [1200, 2400]:
|
||||
# On tall screens the photo fills the page and the tape stays above the logo.
|
||||
background.crop((0, 340, 2400, 1800)).resize((1200, 730), Image.Resampling.LANCZOS).save(
|
||||
ASSETS / 'background-mobile.webp', quality=89, method=6)
|
||||
tape = artwork([*list(source)[12:24], *list(source)[41:50]], (0, 0, 1200, 254))
|
||||
tape = artwork([*list(source)[12:24], *list(source)[41:50]], (0, 0, 1200, 270))
|
||||
tape = tape.replace('#fdc200', '#fbbb0c').replace('#020102', '#0c0c0c')
|
||||
(ASSETS / 'construction-tape.svg').write_text(tape)
|
||||
tape_root = ET.fromstring(tape)
|
||||
# Original IDML shadow, applied separately so the diagonal tape shadows the lower tape.
|
||||
shadow = ET.SubElement(tape_root[0], f'{{{SVG}}}filter', {
|
||||
'id': 'tape-shadow', 'filterUnits': 'userSpaceOnUse',
|
||||
'x': '-20', 'y': '-20', 'width': '1240', 'height': '310',
|
||||
'color-interpolation-filters': 'sRGB',
|
||||
})
|
||||
ET.SubElement(shadow, f'{{{SVG}}}feDropShadow', {
|
||||
'dx': '2.789536', 'dy': '2.789536', 'stdDeviation': '1.9725',
|
||||
'flood-color': '#000', 'flood-opacity': '0.35',
|
||||
})
|
||||
tape_paths = list(tape_root)[1:]
|
||||
for paths in [tape_paths[:12], tape_paths[12:]]:
|
||||
group = ET.SubElement(tape_root, f'{{{SVG}}}g', {'filter': 'url(#tape-shadow)'})
|
||||
for path in paths:
|
||||
tape_root.remove(path)
|
||||
group.append(path)
|
||||
(ASSETS / 'construction-tape.svg').write_text(ET.tostring(tape_root, encoding='unicode'))
|
||||
|
||||
logo_paths = list(source[50])
|
||||
logo = artwork(logo_paths, (507.62, 142, 184.76, 146.67))
|
||||
|
||||
Reference in New Issue
Block a user