Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132import {Image, type ImageProps, StyleSheet} from 'react-native'import Svg, {ClipPath, Defs, G, Path, Rect} from 'react-native-svg'
import {useBrand} from '#/lib/community/BrandContext'import {usePalette} from '#/lib/hooks/usePalette'
const CONTENT_WIDTH = 642.827const CONTENT_HEIGHT = 243.324344const BOUND_TOP = -0.402344
const ratio = CONTENT_HEIGHT / CONTENT_WIDTH
type Props = { style?: ImageProps['style'] width?: number fill?: string}
function isRemoteAsset(path: string): boolean { return path.startsWith('http://') || path.startsWith('https://')}
export function Logotype(props: Props) { const {width = 161, style, fill, ...rest} = props const brand = useBrand() const pal = usePalette('default') const height = width / 3
if (isRemoteAsset(brand.assets.logotype)) { return ( <Image source={{uri: brand.assets.logotype}} accessibilityIgnoresInvertColors style={[{width, height}, StyleSheet.flatten(style)]} {...rest} /> ) }
const size = width const _fill = fill || pal.text.color
return ( <Svg fill="none" viewBox={`0 0 ${CONTENT_WIDTH} ${CONTENT_HEIGHT}`} width={size} height={size * ratio} style={StyleSheet.flatten(style)}> <Defs> <ClipPath id="clip0_1011_1003"> <Rect x={0} y={0} width={CONTENT_WIDTH} height={CONTENT_HEIGHT} /> </ClipPath> </Defs>
<G clipPath="url(#clip0_1011_1003)" transform={`translate(0 ${-BOUND_TOP})`}> <Path d="M12.9698 100.475C6.05259 100.475 0 94.4225 0 87.5053V-0.401367H17.2931V21.215C17.2931 25.106 20.6076 28.4205 24.4986 28.4205H50.4382C57.3555 28.4205 63.4081 34.4731 63.4081 41.3903V87.5053C63.4081 94.4225 57.3555 100.475 50.4382 100.475H12.9698ZM17.2931 73.0943C17.2931 80.8762 23.9221 87.5053 31.704 87.5053C39.4859 87.5053 46.1149 80.8762 46.1149 73.0943V55.8012C46.1149 48.0193 39.4859 41.3903 31.704 41.3903C23.9221 41.3903 17.2931 48.0193 17.2931 55.8012V73.0943Z" fill={_fill} /> <Path d="M76.3835 100.475V-0.401367H93.6766V100.475H76.3835Z" fill={_fill} /> <Path d="M119.65 100.475C112.733 100.475 106.68 94.4225 106.68 87.5053V76.2647C106.68 71.5091 110.283 66.1771 114.75 64.4478L143.86 52.919C149.048 50.9015 147.751 44.2725 142.275 44.2725H107.545V28.4205H152.795C159.712 28.4205 165.765 34.4731 165.765 41.3903V87.5053C165.765 94.4225 159.712 100.475 152.795 100.475H119.65ZM125.559 78.8587C125.559 85.1995 131.035 90.3874 137.375 90.3874C143.428 90.3874 148.616 85.1995 148.616 78.8587C148.616 72.8061 143.428 67.33 137.375 67.33C131.035 67.33 125.559 72.8061 125.559 78.8587Z" fill={_fill} /> <Path d="M191.738 100.475C184.821 100.475 178.769 94.4225 178.769 87.5053V41.3903C178.769 34.4731 184.821 28.4205 191.738 28.4205H232.665V44.2725H204.708C199.953 44.2725 196.062 48.1634 196.062 52.919V75.9765C196.062 80.7321 199.953 84.6231 204.708 84.6231H232.665V100.475H191.738Z" fill={_fill} /> <Path d="M245.087 100.475V-0.401367H262.38V47.8752C262.38 52.0544 267.136 54.0719 269.874 50.7574L288.176 28.4205H310.801L288.608 55.8012C286.014 58.9716 285.726 63.1508 288.032 66.6094L311.089 100.475H290.049L270.594 72.0856C267.856 68.0505 262.38 70.2122 262.38 74.8236V100.475H245.087Z" fill={_fill} /> <Path d="M17.9249 214.1C11.0077 214.1 4.95508 208.048 4.95508 201.131V189.89C4.95508 185.135 8.55781 179.802 13.0252 178.073L42.1353 166.544C47.3232 164.527 46.0262 157.898 40.5501 157.898H5.81973V142.046H51.07C57.9873 142.046 64.0399 148.098 64.0399 155.016V201.131C64.0399 208.048 57.9873 214.1 51.07 214.1H17.9249ZM23.8334 192.484C23.8334 198.825 29.3095 204.013 35.6503 204.013C41.7029 204.013 46.8909 198.825 46.8909 192.484C46.8909 186.432 41.7029 180.955 35.6503 180.955C29.3095 180.955 23.8334 186.432 23.8334 192.484Z" fill={_fill} /> <Path d="M77.0434 214.1V113.224H94.3366V214.1H77.0434Z" fill={_fill} /> <Path d="M107.484 242.922V227.07H148.411C152.014 227.07 154.896 224.188 154.896 220.585C154.896 216.983 152.014 214.1 148.411 214.1H120.31C113.393 214.1 107.34 208.048 107.34 201.131V155.016C107.34 148.098 113.393 142.046 120.31 142.046H157.778C164.696 142.046 170.748 148.098 170.748 155.016V229.952C170.748 236.87 164.696 242.922 157.778 242.922H107.484ZM124.633 186.72C124.633 194.502 131.262 201.131 139.044 201.131C146.826 201.131 153.455 194.502 153.455 186.72V169.427C153.455 161.645 146.826 155.016 139.044 155.016C131.262 155.016 124.633 161.645 124.633 169.427V186.72Z" fill={_fill} /> <Path d="M195.252 214.1C188.335 214.1 182.283 208.048 182.283 201.131V155.016C182.283 148.098 188.335 142.046 195.252 142.046H232.721C239.638 142.046 245.691 148.098 245.691 155.016V201.131C245.691 208.048 239.638 214.1 232.721 214.1H195.252ZM199.576 186.72C199.576 194.502 206.205 201.131 213.987 201.131C221.768 201.131 228.398 194.502 228.398 186.72V169.427C228.398 161.645 221.768 155.016 213.987 155.016C206.205 155.016 199.576 161.645 199.576 169.427V186.72Z" fill={_fill} /> <Path d="M257.225 150.692C257.225 145.937 261.116 142.046 265.872 142.046H302.475V157.898H283.165C278.409 157.898 274.518 161.789 274.518 166.544V214.1H257.225V150.692Z" fill={_fill} /> <Path d="M310.079 214.1V142.046H327.372V214.1H310.079ZM306.909 124.176C306.909 117.547 312.241 112.359 318.726 112.359C325.211 112.359 330.687 117.547 330.687 124.176C330.687 130.517 325.211 136.137 318.726 136.137C312.241 136.137 306.909 130.517 306.909 124.176Z" fill={_fill} /> <Path d="M352.247 214.1C345.33 214.1 339.277 208.048 339.277 201.131V118.412H356.57V133.399C356.57 138.155 360.461 142.046 365.217 142.046H388.13V157.898H365.217C360.461 157.898 356.57 161.789 356.57 166.544V189.602C356.57 194.358 360.461 198.248 365.217 198.248H388.13V214.1H352.247Z" fill={_fill} /> <Path d="M396.206 214.1V113.224H413.499V134.84C413.499 138.731 416.814 142.046 420.704 142.046H446.644C453.561 142.046 459.614 148.098 459.614 155.016V214.1H442.321V169.427C442.321 161.645 435.692 155.016 427.91 155.016C420.128 155.016 413.499 161.645 413.499 169.427V214.1H396.206Z" fill={_fill} /> <Path d="M471.148 155.016C471.148 148.098 477.201 142.046 484.118 142.046H561.937C568.854 142.046 574.907 148.098 574.907 155.016V214.1H557.614V167.986C557.614 161.068 551.561 155.016 544.644 155.016C537.727 155.016 531.674 161.068 531.674 167.986V214.1H514.381V167.986C514.381 161.068 508.329 155.016 501.411 155.016C494.494 155.016 488.441 161.068 488.441 167.986V214.1H471.148V155.016Z" fill={_fill} /> <Path d="M584.463 214.1V198.248H618.041C624.67 198.248 625.534 189.746 619.626 187.873L591.813 178.794C587.345 177.353 583.599 172.165 583.599 167.409V155.016C583.599 148.098 589.651 142.046 596.568 142.046H641.963V157.898H608.674C602.045 157.898 601.036 166.256 606.944 168.274L634.613 177.353C639.081 178.794 642.827 183.982 642.827 188.737V201.131C642.827 208.048 636.775 214.1 629.858 214.1H584.463Z" fill={_fill} /> <Path d="M321.23 100.474V84.6221H354.807C361.436 84.6221 362.301 76.1197 356.393 74.2462L328.579 65.1674C324.112 63.7263 320.365 58.5383 320.365 53.7827V41.3893C320.365 34.4721 326.418 28.4195 333.335 28.4195H378.729V44.2715H345.44C338.811 44.2715 337.802 52.6298 343.711 54.6474L371.38 63.7263C375.847 65.1674 379.594 70.3553 379.594 75.1109V87.5043C379.594 94.4215 373.542 100.474 366.624 100.474H321.23Z" fill={_fill} /> <Path d="M395.403 100.474V-0.402344H412.696V47.8742C412.696 52.0534 417.452 54.0709 420.19 50.7564L438.492 28.4195H461.117L438.924 55.8003C436.33 58.9707 436.042 63.1498 438.348 66.6084L461.405 100.474H440.365L420.911 72.0846C418.173 68.0495 412.696 70.2112 412.696 74.8227V100.474H395.403Z" fill={_fill} /> <Path d="M471.61 129.296V113.444H512.537C516.14 113.444 519.022 110.562 519.022 106.959C519.022 103.356 516.14 100.474 512.537 100.474H484.436C477.519 100.474 471.466 94.4215 471.466 87.5043V28.4195H488.759V73.0934C488.759 80.8753 495.388 87.5043 503.17 87.5043C510.952 87.5043 517.581 80.8753 517.581 73.0934V28.4195H534.874V116.326C534.874 123.243 528.821 129.296 521.904 129.296H471.61Z" fill={_fill} /> </G> </Svg> )}