mirror of
https://github.com/shadoll/sLogos.git
synced 2025-12-20 03:26:59 +00:00
feat: update Apple SVG with new color sets and remove legacy rainbow SVG
This commit is contained in:
@@ -73,23 +73,42 @@
|
||||
"path": "logos/apple.svg",
|
||||
"format": "SVG",
|
||||
"disable": false,
|
||||
"brand": "Apple",
|
||||
"tags": [
|
||||
"tech"
|
||||
],
|
||||
"brand": "Apple",
|
||||
"colors": {
|
||||
"green": "#75bd21",
|
||||
"yellow": "#ffc728",
|
||||
"orange": "#ff661c",
|
||||
"red": "#cf0f2b",
|
||||
"pink": "#b01cab",
|
||||
"blue": "#00a1de",
|
||||
"silver": "#999",
|
||||
"dark_grey": "#666"
|
||||
},
|
||||
"targets": {
|
||||
"main": "path"
|
||||
"line1": "#line1",
|
||||
"line2": "#line2",
|
||||
"line3": "#line3",
|
||||
"line4": "#line4",
|
||||
"line5": "#line5",
|
||||
"line6": "#line6"
|
||||
},
|
||||
"sets": {
|
||||
"set_1": {
|
||||
"main": "silver"
|
||||
"silver": {
|
||||
"line1": "silver"
|
||||
},
|
||||
"set_2": {
|
||||
"main": "dark_grey"
|
||||
"dark_grey": {
|
||||
"line1": "dark_grey"
|
||||
},
|
||||
"rainbow": {
|
||||
"line1": "green",
|
||||
"line2": "yellow",
|
||||
"line3": "orange",
|
||||
"line4": "red",
|
||||
"line5": "pink",
|
||||
"line6": "blue"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -104,16 +123,6 @@
|
||||
"storage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Apple Rainbow",
|
||||
"path": "logos/apple_rainbow.svg",
|
||||
"format": "SVG",
|
||||
"disable": false,
|
||||
"tags": [
|
||||
"tech"
|
||||
],
|
||||
"brand": "Apple"
|
||||
},
|
||||
{
|
||||
"name": "Apple App Store",
|
||||
"path": "logos/apple_app_store.svg",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2038" height="2500" viewBox="0 0 496.255 608.728">
|
||||
<path
|
||||
d="M273.81 52.973C313.806.257 369.41 0 369.41 0s8.271 49.562-31.463 97.306c-42.426 50.98-90.649 42.638-90.649 42.638s-9.055-40.094 26.512-86.971zM252.385 174.662c20.576 0 58.764-28.284 108.471-28.284 85.562 0 119.222 60.883 119.222 60.883s-65.833 33.659-65.833 115.331c0 92.133 82.01 123.885 82.01 123.885s-57.328 161.357-134.762 161.357c-35.565 0-63.215-23.967-100.688-23.967-38.188 0-76.084 24.861-100.766 24.861C89.33 608.73 0 455.666 0 332.628c0-121.052 75.612-184.554 146.533-184.554 46.105 0 81.883 26.588 105.852 26.588z"
|
||||
fill="currentColor" />
|
||||
<svg width="100%" height="100%" viewBox="0 0 90 105" xmlns="http://www.w3.org/2000/svg">
|
||||
<clipPath id="_clipRainbowEffect">
|
||||
<path
|
||||
d="M64.671,0c-5.609,0.387 -12.165,3.953 -15.993,8.602c-3.477,4.218 -6.347,10.479 -5.23,16.562c6.121,0.191 12.453,-3.465 16.128,-8.18c3.43,-4.406 6.04,-10.628 5.095,-16.983l0,-0.001Zm2.074,24.483c-9.449,-0 -13.441,4.493 -19.992,4.493c-6.754,-0 -11.896,-4.484 -20.06,-4.484c-8.027,-0 -16.558,4.879 -21.968,13.207c-0.031,0.051 -0.067,0.1 -0.098,0.155c-2.309,3.613 -3.777,8.195 -4.351,13.348c-0.465,4.145 -0.344,8.668 0.387,13.352c0.683,4.359 1.898,8.868 3.668,13.352c1.648,4.176 3.781,8.34 6.417,12.352c0.219,0.332 0.442,0.668 0.668,1.003c4.332,6.446 10.02,13.274 17.344,13.34c6.852,0.063 8.794,-4.371 18.087,-4.422c9.296,-0.051 11.054,4.469 17.906,4.406c7.02,-0.062 12.808,-7.011 17.117,-13.332c0.422,-0.617 0.828,-1.227 1.223,-1.825c2.926,-4.453 4.147,-6.863 6.261,-11.515c0.172,-0.375 0.349,-0.766 0.536,-1.172c-6.16,-2.328 -10.532,-6.855 -12.895,-12.183c-1.859,-4.18 -2.472,-8.86 -1.742,-13.356c0.813,-4.976 3.282,-9.73 7.547,-13.343c1.2,-1.019 2.542,-1.945 4.035,-2.761c-5.391,-6.723 -12.957,-10.614 -20.089,-10.614l-0.001,-0.001Z" />
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clipRainbowEffect)">
|
||||
<rect id="line1" x="-13.341" y="-13.34" width="116.573" height="117.963" fill="currentColor" />
|
||||
<rect id="line2" x="-13.341" y="37.855" width="116.573" height="26.699" fill="none" />
|
||||
<rect id="line3" x="-13.341" y="51.207" width="116.573" height="26.695" fill="none" />
|
||||
<rect id="line4" x="-13.341" y="64.557" width="116.573" height="26.699" fill="none" />
|
||||
<rect id="line5" x="-13.341" y="77.907" width="116.573" height="26.68" fill="none" />
|
||||
<rect id="line6" x="-13.341" y="91.267" width="116.573" height="26.68" fill="none" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 1.8 KiB |
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg version="1.2" viewBox="0 0 89.888 104.6" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<clipPath id="clipPath692">
|
||||
<path
|
||||
d="m150.97 50.793c-9.0676 0.38672-19.665 3.9531-25.853 8.6016-5.6199 4.2187-10.259 10.479-8.4535 16.562 9.8948 0.19141 20.129-3.4648 26.071-8.1797 5.5441-4.4062 9.7638-10.628 8.2357-16.983zm3.353 24.483c-15.275 0-21.728 4.4927-32.318 4.4927-10.918 0-19.229-4.4839-32.426-4.4839-12.976 0-26.766 4.8789-35.512 13.207-0.05056 0.05078-0.10827 0.10058-0.15865 0.15528-3.7319 3.6133-6.1045 8.1953-7.0328 13.348-0.75143 4.1445-0.55568 8.6684 0.62513 13.352 1.105 4.3594 3.0688 8.8677 5.9293 13.352 2.6647 4.1758 6.1117 8.3398 10.374 12.352 0.35362 0.33203 0.71355 0.66748 1.0798 1.0034 7.0027 6.4453 16.197 13.274 28.036 13.34 11.076 0.0625 14.215-4.3716 29.237-4.4224 15.028-0.0508 17.87 4.4688 28.946 4.4062 11.347-0.0625 20.704-7.0112 27.669-13.332 0.68195-0.61719 1.3395-1.2275 1.9772-1.8252 4.7296-4.4531 6.7044-6.8628 10.121-11.515 0.27784-0.375 0.56356-0.76562 0.86666-1.1719-9.9579-2.3281-17.025-6.855-20.845-12.183-3.0057-4.1797-3.9963-8.8604-2.8155-13.356 1.3134-4.9766 5.3042-9.73 12.2-13.343 1.9386-1.0195 4.1092-1.9448 6.5213-2.7612-8.714-6.7226-20.944-10.614-32.474-10.614z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g transform="matrix(.61862 0 0 1 -28.722 -50.793)" clip-path="url(#clipPath692)">
|
||||
<g stroke-linecap="round">
|
||||
<rect x="24.863" y="37.453" width="188.44" height="64.547" fill="#75bd21" />
|
||||
<rect x="24.863" y="88.648" width="188.44" height="26.699" fill="#ffc728" />
|
||||
<rect x="24.863" y="102" width="188.44" height="26.695" fill="#ff661c" />
|
||||
<rect x="24.863" y="115.35" width="188.44" height="26.699" fill="#cf0f2b" />
|
||||
<rect x="24.863" y="128.7" width="188.44" height="26.68" fill="#b01cab" />
|
||||
<rect x="24.863" y="142.06" width="188.44" height="26.68" fill="#00a1de" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -69,11 +69,12 @@ function applySvgColors(svgContent, colorSet, targets) {
|
||||
const elementId = selector.substring(1);
|
||||
|
||||
// First, remove any existing fill attributes for this element
|
||||
const removeExistingFillRegex = new RegExp(`(id="${elementId}"[^>]*?)\\s*fill="[^"]*"`, 'g');
|
||||
modifiedSvg = modifiedSvg.replace(removeExistingFillRegex, '$1');
|
||||
// Updated regex to preserve the closing tag structure
|
||||
const removeExistingFillRegex = new RegExp(`(id="${elementId}"[^>]*?)\\s*fill="[^"]*"([^>]*>)`, 'g');
|
||||
modifiedSvg = modifiedSvg.replace(removeExistingFillRegex, '$1$2');
|
||||
|
||||
// Then add the new fill attribute
|
||||
const addFillRegex = new RegExp(`(id="${elementId}"[^>]*?)(\s*>)`, 'g');
|
||||
// Then add the new fill attribute before the closing >
|
||||
const addFillRegex = new RegExp(`(id="${elementId}"[^>]*?)(\s*\/?>)`, 'g');
|
||||
modifiedSvg = modifiedSvg.replace(addFillRegex, `$1 fill="${color}"$2`);
|
||||
} else {
|
||||
// Default: replace all fill attributes (fallback)
|
||||
|
||||
Reference in New Issue
Block a user