refactor(icons): replace local brand SVGs with FA5 classes
Unify social/OAuth/contact icons on the global Font Awesome 5.15.4 pack, add aksrt_render_social_links for author hero, enqueue FA on admin SPA, and delete assets/img/icons.
@@ -144,17 +144,10 @@
|
||||
background: var(--focus-color, var(--color-primary));
|
||||
}
|
||||
|
||||
.footer .footer-contact > a i,
|
||||
.footer .footer-contact > a svg {
|
||||
.footer .footer-contact > a i {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.footer .footer-contact > a svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.footer .footer-wechat-img {
|
||||
display: none;
|
||||
position: absolute;
|
||||
|
||||
@@ -205,11 +205,10 @@ html.dark .archive-timeline__badge {
|
||||
color: var(--color-ink-3);
|
||||
transition: border-color 0.2s, color 0.2s;
|
||||
}
|
||||
.oauth-btn svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
.oauth-btn i {
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
display: block;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.oauth-btn:hover {
|
||||
|
||||
@@ -119,12 +119,11 @@ html.dark .zib-widget {
|
||||
color: #fff;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.profile-social-links a svg,
|
||||
.social-icon-link svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
.profile-social-links a i,
|
||||
.social-icon-link i {
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
display: block;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -537,9 +537,9 @@
|
||||
color: var(--color-ink);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.binding-item__icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.binding-item__icon i {
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
}
|
||||
.binding-item__meta {
|
||||
display: flex;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805589513" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14190" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M306.005333 117.632L444.330667 256h135.296l138.368-138.325333a42.666667 42.666667 0 1 1 60.373333 60.373333l-78.037333 77.952L789.333333 256A149.333333 149.333333 0 0 1 938.666667 405.333333v341.333334a149.333333 149.333333 0 0 1-149.333334 149.333333h-554.666666A149.333333 149.333333 0 0 1 85.333333 746.666667v-341.333334A149.333333 149.333333 0 0 1 234.666667 256h88.96L245.632 177.962667a42.666667 42.666667 0 0 1 60.373333-60.373334zM789.333333 341.333333h-554.666666a64 64 0 0 0-63.701334 57.856L170.666667 405.333333v341.333334a64 64 0 0 0 57.856 63.701333L234.666667 810.666667h554.666666a64 64 0 0 0 63.701334-57.813334L853.333333 746.666667v-341.333334A64 64 0 0 0 789.333333 341.333333zM341.333333 469.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v85.333333a42.666667 42.666667 0 1 1-85.333333 0v-85.333333a42.666667 42.666667 0 0 1 42.666666-42.666667z m341.333334 0a42.666667 42.666667 0 0 1 42.666666 42.666667v85.333333a42.666667 42.666667 0 1 1-85.333333 0v-85.333333a42.666667 42.666667 0 0 1 42.666667-42.666667z" p-id="14191"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805577606" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13191" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M862.805333 0c59.989333 0 108.373333 48.512 111.232 105.6V1024l-114.218666-96.981333-62.72-57.088-68.437334-59.648 28.586667 94.08H158.293333c-59.818667 0-108.373333-45.44-108.373333-105.642667V105.813333C49.92 48.725333 98.56 0.128 158.506667 0.128h704L862.805333 0z m-261.034666 242.474667h-1.28l-8.618667 8.533333c88.448 25.6 131.242667 65.578667 131.242667 65.578667-57.002667-28.501333-108.373333-42.752-159.744-48.512-37.12-5.76-74.24-2.730667-105.6 0h-8.533334c-20.053333 0-62.72 8.533333-119.893333 31.36-19.925333 8.661333-31.36 14.336-31.36 14.336s42.752-42.752 136.96-65.578667l-5.76-5.76s-71.338667-2.730667-148.352 54.186667c0 0-77.013333 134.144-77.013333 299.52 0 0 42.666667 74.24 159.701333 77.056 0 0 17.066667-22.741333 34.346667-42.752-65.706667-19.968-91.306667-59.904-91.306667-59.904s5.717333 2.816 14.293333 8.533333h2.56c1.28 0 1.877333 0.64 2.56 1.28v0.256c0.682667 0.682667 1.28 1.28 2.56 1.28 14.08 5.802667 28.16 11.52 39.68 17.066667a349.013333 349.013333 0 0 0 76.8 22.869333c39.68 5.76 85.162667 8.533333 136.96 0 25.6-5.76 51.2-11.392 76.8-22.826667 16.64-8.533333 37.12-17.066667 59.605334-31.445333 0 0-25.6 39.936-94.08 59.904 14.08 19.882667 33.92 42.666667 33.92 42.666667 117.077333-2.56 162.56-76.8 165.12-73.642667 0-165.12-77.44-299.52-77.44-299.52-69.76-51.797333-135.04-53.76-146.56-53.76l2.389333-0.853333z m7.168 188.288c29.994667 0 54.186667 25.6 54.186666 56.96 0 31.573333-24.32 57.173333-54.186666 57.173333-29.866667 0-54.186667-25.6-54.186667-56.917333 0.085333-31.573333 24.448-57.088 54.186667-57.088z m-193.834667 0c29.866667 0 54.016 25.6 54.016 56.96 0 31.573333-24.32 57.173333-54.186667 57.173333-29.866667 0-54.186667-25.6-54.186666-56.917333 0-31.573333 24.32-57.088 54.186666-57.088z" fill="" p-id="13192"></path></svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" ?><svg enable-background="new 0 0 64 64" version="1.1" viewBox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Glyph_copy_2"><path d="M63.125,9.977c-0.902-1.321-2.419-2.194-4.131-2.194H5.006c-1.676,0-3.158,0.842-4.067,2.117l31.16,25.982L63.125,9.977z"/><path d="M0.006,14.328v36.889c0,2.75,2.25,5,5,5h53.988c2.75,0,5-2.25,5-5V14.461L32.099,41.09L0.006,14.328z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 462 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805606814" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16135" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z" p-id="16136"></path></svg>
|
||||
|
Before Width: | Height: | Size: 652 B |
@@ -1 +0,0 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Gitee</title><path d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 590 B |
@@ -1 +0,0 @@
|
||||
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M12 0c6.63 0 12 5.276 12 11.79-.001 5.067-3.29 9.567-8.175 11.187-.6.118-.825-.25-.825-.56 0-.398.015-1.665.015-3.242 0-1.105-.375-1.813-.81-2.181 2.67-.295 5.475-1.297 5.475-5.822 0-1.297-.465-2.344-1.23-3.169.12-.295.54-1.503-.12-3.125 0 0-1.005-.324-3.3 1.209a11.32 11.32 0 00-3-.398c-1.02 0-2.04.133-3 .398-2.295-1.518-3.3-1.209-3.3-1.209-.66 1.622-.24 2.83-.12 3.125-.765.825-1.23 1.887-1.23 3.169 0 4.51 2.79 5.527 5.46 5.822-.345.294-.66.81-.765 1.577-.69.31-2.415.81-3.495-.973-.225-.354-.9-1.223-1.845-1.209-1.005.015-.405.56.015.781.51.28 1.095 1.327 1.23 1.666.24.663 1.02 1.93 4.035 1.385 0 .988.015 1.916.015 2.196 0 .31-.225.664-.825.56C3.303 21.374-.003 16.867 0 11.791 0 5.276 5.37 0 12 0z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 907 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805454365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M932.169143 529.92c0-35.291429-2.852571-61.019429-9.051429-87.698286H520.374857v159.177143h236.397714c-4.754286 39.570286-30.500571 99.145143-87.698285 139.172572l-0.804572 5.321142 127.341715 98.651429 8.832 0.877714c81.005714-74.825143 127.725714-184.923429 127.725714-315.52" p-id="5965"></path><path d="M520.374857 949.321143c115.821714 0 213.046857-38.125714 284.068572-103.899429L669.074286 740.571429c-36.205714 25.252571-84.845714 42.898286-148.699429 42.898285-113.426286 0-209.700571-74.825143-244.022857-178.249143l-5.028571 0.420572-132.406858 102.473143-1.737142 4.809143c70.546286 140.123429 215.424 236.397714 383.195428 236.397714" p-id="5966"></path><path d="M276.352 605.220571a264.082286 264.082286 0 0 1-14.299429-84.845714c0-29.549714 5.248-58.148571 13.824-84.845714l-0.237714-5.668572-134.070857-104.118857-4.388571 2.084572A429.348571 429.348571 0 0 0 91.428571 520.374857c0 69.12 16.676571 134.4 45.750858 192.548572l139.172571-107.702858" p-id="5967"></path><path d="M520.374857 257.28c80.548571 0 134.875429 34.797714 165.851429 63.872L807.314286 202.971429C732.946286 133.851429 636.196571 91.428571 520.411429 91.428571c-167.789714 0-312.685714 96.274286-383.213715 236.397715l138.697143 107.702857c34.797714-103.405714 131.072-178.249143 244.498286-178.249143" p-id="5968"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805626389" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18111" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 306.9c-113.5 0-205.1 91.6-205.1 205.1S398.5 717.1 512 717.1 717.1 625.5 717.1 512 625.5 306.9 512 306.9z m0 338.4c-73.4 0-133.3-59.9-133.3-133.3S438.6 378.7 512 378.7 645.3 438.6 645.3 512 585.4 645.3 512 645.3zM725.5 250.7c-26.5 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9 47.9-21.3 47.9-47.9c-0.1-26.6-21.4-47.9-47.9-47.9z" p-id="18112"></path><path d="M911.8 512c0-55.2 0.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-0.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-0.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9 0.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165z m-88 235.8c-7.3 18.2-16.1 31.8-30.2 45.8-14.1 14.1-27.6 22.9-45.8 30.2C695.2 844.7 570.3 840 512 840c-58.3 0-183.3 4.7-235.9-16.1-18.2-7.3-31.8-16.1-45.8-30.2-14.1-14.1-22.9-27.6-30.2-45.8C179.3 695.2 184 570.3 184 512c0-58.3-4.7-183.3 16.1-235.9 7.3-18.2 16.1-31.8 30.2-45.8s27.6-22.9 45.8-30.2C328.7 179.3 453.7 184 512 184s183.3-4.7 235.9 16.1c18.2 7.3 31.8 16.1 45.8 30.2 14.1 14.1 22.9 27.6 30.2 45.8C844.7 328.7 840 453.7 840 512c0 58.3 4.7 183.2-16.2 235.8z" p-id="18113"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805597207" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15159" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M847.7 112H176.3c-35.5 0-64.3 28.8-64.3 64.3v671.4c0 35.5 28.8 64.3 64.3 64.3h671.4c35.5 0 64.3-28.8 64.3-64.3V176.3c0-35.5-28.8-64.3-64.3-64.3z m0 736c-447.8-0.1-671.7-0.2-671.7-0.3 0.1-447.8 0.2-671.7 0.3-671.7 447.8 0.1 671.7 0.2 671.7 0.3-0.1 447.8-0.2 671.7-0.3 671.7z" p-id="15160"></path><path d="M230.6 411.9h118.7v381.8H230.6zM290 359.7c37.9 0 68.8-30.8 68.8-68.8 0-37.9-30.8-68.8-68.8-68.8s-68.8 30.8-68.8 68.8c-0.1 38 30.7 68.8 68.8 68.8zM542.3 604.8c0-49.8 9.5-98 71.2-98 60.8 0 61.7 56.9 61.7 101.2v185.7h118.6V584.3c0-102.8-22.2-181.9-142.3-181.9-57.7 0-96.4 31.7-112.3 61.7h-1.6v-52.2H423.7v381.8h118.6V604.8z" p-id="15161"></path></svg>
|
||||
|
Before Width: | Height: | Size: 986 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805539897" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9893" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z" p-id="9894"></path></svg>
|
||||
|
Before Width: | Height: | Size: 780 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805567156" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12198" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M883.626667 155.946667s82.858667-32.341333 75.946666 46.165333c-2.261333 32.298667-22.997333 145.408-39.125333 267.776l-55.253333 362.453333s-4.608 53.077333-46.08 62.293334c-41.386667 9.258667-103.552-32.298667-115.072-41.514667-9.216-6.912-172.672-110.805333-230.272-161.621333-16.085333-13.824-34.517333-41.557333 2.346666-73.856l241.749334-230.826667c27.605333-27.733333 55.253333-92.373333-59.861334-13.866667l-322.346666 219.306667s-36.864 23.04-105.898667 2.304l-149.674667-46.165333s-55.253333-34.645333 39.125334-69.248C349.482667 370.56 632.661333 259.84 883.626667 155.904z" p-id="12199"></path></svg>
|
||||
|
Before Width: | Height: | Size: 946 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805635098" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19241" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 32C246.912 32 32 246.848 32 512s214.912 480 480 480c265.152 0 480-214.848 480-480S777.152 32 512 32zM320.256 143.04c20.864-10.88 42.688-20.16 65.408-27.392-23.616 34.624-43.968 78.656-59.904 129.6-23.808-15.232-37.76-33.472-37.76-53.248 0-17.984 12.224-34.56 32.256-48.96zM227.136 209.344c7.424 37.568 36.864 71.296 82.752 96.512-11.84 53.376-19.2 112.064-21.12 174.144H97.6a414.464 414.464 0 0 1 129.536-270.656z m0 605.312A414.464 414.464 0 0 1 97.6 544h191.104c1.92 62.08 9.344 120.768 21.184 174.144-45.888 25.088-75.328 58.944-82.752 96.512z m93.12 66.304C300.224 866.56 288 849.92 288 832c0-19.776 13.952-38.08 37.76-53.312 15.936 51.008 36.288 94.976 59.904 129.664a411.392 411.392 0 0 1-65.408-27.392z m159.744 38.656c-40.192-21.184-74.816-81.856-97.92-165.568a425.536 425.536 0 0 1 97.92-16.704v182.272z m0-245.824a454.592 454.592 0 0 0-111.68 20.288A966.4 966.4 0 0 1 352.64 544H480v129.792z m0-193.792H352.64a966.4 966.4 0 0 1 15.68-150.08 460.608 460.608 0 0 0 111.68 20.352V480z m0-193.344a432.512 432.512 0 0 1-97.92-16.704c23.104-83.712 57.728-144.32 97.92-165.568v182.272z m316.864-77.312A414.08 414.08 0 0 1 926.336 480h-191.104c-1.92-62.08-9.344-120.768-21.184-174.144 45.952-25.152 75.392-58.944 82.816-96.512z m-93.12-66.304c20.032 14.4 32.256 30.976 32.256 48.96 0 19.776-13.952 38.016-37.76 53.248-15.936-50.944-36.288-94.976-59.968-129.6a409.6 409.6 0 0 1 65.472 27.392zM544 104.384c40.256 21.248 74.88 81.856 97.92 165.568a432.512 432.512 0 0 1-97.92 16.704V104.384z m0 245.888a460.096 460.096 0 0 0 111.68-20.288c8.64 45.888 14.144 96.448 15.68 150.016H544V350.272z m0 193.728h127.36c-1.536 53.568-7.04 104.128-15.68 150.144a454.016 454.016 0 0 0-111.68-20.288V544z m0 375.616v-182.272a425.536 425.536 0 0 1 97.92 16.704c-23.04 83.712-57.664 144.384-97.92 165.568z m159.744-38.656c-20.864 10.88-42.688 20.16-65.408 27.456 23.616-34.688 44.032-78.656 59.968-129.664 23.808 15.232 37.76 33.536 37.76 53.312-0.064 17.856-12.288 34.496-32.32 48.896z m93.12-66.304c-7.424-37.568-36.928-71.36-82.816-96.512a936.96 936.96 0 0 0 21.184-174.144h191.104a414.08 414.08 0 0 1-129.472 270.656z" fill="" p-id="19242"></path></svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="mdi-wechat" width="24" height="24" viewBox="0 0 24 24"><path d="M9.5,4C5.36,4 2,6.69 2,10C2,11.89 3.08,13.56 4.78,14.66L4,17L6.5,15.5C7.39,15.81 8.37,16 9.41,16C9.15,15.37 9,14.7 9,14C9,10.69 12.13,8 16,8C16.19,8 16.38,8 16.56,8.03C15.54,5.69 12.78,4 9.5,4M6.5,6.5A1,1 0 0,1 7.5,7.5A1,1 0 0,1 6.5,8.5A1,1 0 0,1 5.5,7.5A1,1 0 0,1 6.5,6.5M11.5,6.5A1,1 0 0,1 12.5,7.5A1,1 0 0,1 11.5,8.5A1,1 0 0,1 10.5,7.5A1,1 0 0,1 11.5,6.5M16,9C12.69,9 10,11.24 10,14C10,16.76 12.69,19 16,19C16.67,19 17.31,18.92 17.91,18.75L20,20L19.38,18.13C20.95,17.22 22,15.71 22,14C22,11.24 19.31,9 16,9M14,11.5A1,1 0 0,1 15,12.5A1,1 0 0,1 14,13.5A1,1 0 0,1 13,12.5A1,1 0 0,1 14,11.5M18,11.5A1,1 0 0,1 19,12.5A1,1 0 0,1 18,13.5A1,1 0 0,1 17,12.5A1,1 0 0,1 18,11.5Z" /></svg>
|
||||
|
Before Width: | Height: | Size: 981 B |
@@ -1 +0,0 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Sina Weibo</title><path d="M10.098 20.323c-3.977.391-7.414-1.406-7.672-4.02-.259-2.609 2.759-5.047 6.74-5.441 3.979-.394 7.413 1.404 7.671 4.018.259 2.6-2.759 5.049-6.737 5.439l-.002.004zM9.05 17.219c-.384.616-1.208.884-1.829.602-.612-.279-.793-.991-.406-1.593.379-.595 1.176-.861 1.793-.601.622.263.82.972.442 1.592zm1.27-1.627c-.141.237-.449.353-.689.253-.236-.09-.313-.361-.177-.586.138-.227.436-.346.672-.24.239.09.315.36.18.601l.014-.028zm.176-2.719c-1.893-.493-4.033.45-4.857 2.118-.836 1.704-.026 3.591 1.886 4.21 1.983.64 4.318-.341 5.132-2.179.8-1.793-.201-3.642-2.161-4.149zm7.563-1.224c-.346-.105-.57-.18-.405-.615.375-.977.42-1.804 0-2.404-.781-1.112-2.915-1.053-5.364-.03 0 0-.766.331-.571-.271.376-1.217.315-2.224-.27-2.809-1.338-1.337-4.869.045-7.888 3.08C1.309 10.87 0 13.273 0 15.348c0 3.981 5.099 6.395 10.086 6.395 6.536 0 10.888-3.801 10.888-6.82 0-1.822-1.547-2.854-2.915-3.284v.01zm1.908-5.092c-.766-.856-1.908-1.187-2.96-.962-.436.09-.706.511-.616.932.09.42.511.691.932.602.511-.105 1.067.044 1.442.465.376.421.466.977.316 1.473-.136.406.089.856.51.992.405.119.857-.105.992-.512.33-1.021.12-2.178-.646-3.035l.03.045zm2.418-2.195c-1.576-1.757-3.905-2.419-6.054-1.968-.496.104-.812.587-.706 1.081.104.496.586.813 1.082.707 1.532-.331 3.185.15 4.296 1.383 1.112 1.246 1.429 2.943.947 4.416-.165.48.106 1.007.586 1.157.479.165.991-.104 1.157-.586.675-2.088.241-4.478-1.338-6.235l.03.045z"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px"><path d="M 11 4 C 7.134 4 4 7.134 4 11 L 4 39 C 4 42.866 7.134 46 11 46 L 39 46 C 42.866 46 46 42.866 46 39 L 46 11 C 46 7.134 42.866 4 39 4 L 11 4 z M 13.085938 13 L 21.023438 13 L 26.660156 21.009766 L 33.5 13 L 36 13 L 27.789062 22.613281 L 37.914062 37 L 29.978516 37 L 23.4375 27.707031 L 15.5 37 L 13 37 L 22.308594 26.103516 L 13.085938 13 z M 16.914062 15 L 31.021484 35 L 34.085938 35 L 19.978516 15 L 16.914062 15 z"/></svg>
|
||||
|
Before Width: | Height: | Size: 522 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1777805617081" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17138" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M941.3 296.1c-10.3-38.6-40.7-69-79.2-79.3C792.2 198 512 198 512 198s-280.2 0-350.1 18.7C123.3 227 93 257.4 82.7 296 64 366 64 512 64 512s0 146 18.7 215.9c10.3 38.6 40.7 69 79.2 79.3C231.8 826 512 826 512 826s280.2 0 350.1-18.8c38.6-10.3 68.9-40.7 79.2-79.3C960 658 960 512 960 512s0-146-18.7-215.9zM423 646V378l232 133-232 135z" p-id="17139"></path></svg>
|
||||
|
Before Width: | Height: | Size: 689 B |
@@ -254,8 +254,12 @@ if ($_footer_conter === '') {
|
||||
$m_url = (string) ($more_item['link'] ?? '');
|
||||
$m_text = (string) ($more_item['desc'] ?? '');
|
||||
$m_icon = (string) ($more_item['icon'] ?? '');
|
||||
$m_svg = ($m_icon !== '' && function_exists('aksrt_inline_svg')) ? aksrt_inline_svg($m_icon) : '';
|
||||
$m_icon_html = $m_svg !== '' ? $m_svg : '<i class="fas fa-heart" aria-hidden="true"></i>';
|
||||
$m_icon_html = ($m_icon !== '' && function_exists('aksrt_brand_icon'))
|
||||
? aksrt_brand_icon($m_icon)
|
||||
: '';
|
||||
if ($m_icon_html === '') {
|
||||
$m_icon_html = '<i class="fas fa-heart" aria-hidden="true"></i>';
|
||||
}
|
||||
if ($m_img !== '') :
|
||||
?>
|
||||
<a class="toggle-radius hover-show nowave" href="javascript:;" title="<?php echo esc_attr($m_text); ?>">
|
||||
@@ -274,14 +278,13 @@ if ($_footer_conter === '') {
|
||||
$c_icon = $contact['icon'] ?? '';
|
||||
$c_url = $contact['url'] ?? '#';
|
||||
$c_label = $contact['title'] ?? ($contact['label'] ?? (function_exists('aksrt_icon_key_to_name') ? aksrt_icon_key_to_name($c_icon) : ''));
|
||||
$c_svg = function_exists('aksrt_inline_svg') ? aksrt_inline_svg($c_icon) : '';
|
||||
$c_icon_html = function_exists('aksrt_brand_icon') ? aksrt_brand_icon((string) $c_icon) : '';
|
||||
if ($c_icon_html === '') {
|
||||
$c_icon_html = '<i class="fas fa-globe" aria-hidden="true"></i>';
|
||||
}
|
||||
?>
|
||||
<a class="toggle-radius" href="<?php echo esc_url($c_url); ?>" target="_blank" rel="noopener noreferrer" title="<?php echo esc_attr($c_label); ?>" aria-label="<?php echo esc_attr($c_label); ?>">
|
||||
<?php if ($c_svg !== '') : ?>
|
||||
<?php echo $c_svg; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php else : ?>
|
||||
<i class="fas fa-globe" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
<?php echo $c_icon_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -115,6 +115,14 @@ class AKSRT_Admin {
|
||||
}
|
||||
}
|
||||
|
||||
// Match frontend FA5 pack so FaIcon / menu glyphs render in the SPA.
|
||||
wp_enqueue_style(
|
||||
'aksrt-font-awesome-5',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css',
|
||||
[],
|
||||
'5.15.4'
|
||||
);
|
||||
|
||||
wp_enqueue_script(
|
||||
'aksrt-admin-app',
|
||||
$build_uri . 'index.js',
|
||||
|
||||
@@ -239,7 +239,7 @@ trait AKSRT_OAuth_Part_1 {
|
||||
$result[] = [
|
||||
'name' => $key,
|
||||
'label' => $platform_names[$key] ?? ucfirst($key),
|
||||
'icon' => aksrt_inline_svg($key),
|
||||
'icon' => function_exists('aksrt_brand_icon') ? aksrt_brand_icon((string) $key) : '',
|
||||
'url' => esc_url($url),
|
||||
];
|
||||
}
|
||||
@@ -350,14 +350,14 @@ trait AKSRT_OAuth_Part_1 {
|
||||
if (empty($enabled_providers)) return '';
|
||||
|
||||
$icons = [
|
||||
'github' => aksrt_inline_svg('github'),
|
||||
'gitee' => aksrt_inline_svg('gitee'),
|
||||
'qq' => aksrt_inline_svg('qq'),
|
||||
'google' => aksrt_inline_svg('google'),
|
||||
'weibo' => aksrt_inline_svg('weibo'),
|
||||
'weixin' => aksrt_inline_svg('wechat'),
|
||||
'baidu' => '<span class="oauth-btn__fallback">B</span>',
|
||||
'alipay' => '<span class="oauth-btn__fallback">A</span>',
|
||||
'github' => aksrt_brand_icon('github'),
|
||||
'gitee' => aksrt_brand_icon('gitee'),
|
||||
'qq' => aksrt_brand_icon('qq'),
|
||||
'google' => aksrt_brand_icon('google'),
|
||||
'weibo' => aksrt_brand_icon('weibo'),
|
||||
'weixin' => aksrt_brand_icon('weixin'),
|
||||
'baidu' => aksrt_brand_icon('baidu'),
|
||||
'alipay' => aksrt_brand_icon('alipay'),
|
||||
];
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -16,14 +16,14 @@ trait AKSRT_OAuth_Part_2 {
|
||||
'baidu' => 'Baidu', 'alipay' => 'Alipay',
|
||||
];
|
||||
$icons = [
|
||||
'github' => aksrt_inline_svg('github'),
|
||||
'gitee' => aksrt_inline_svg('gitee'),
|
||||
'qq' => aksrt_inline_svg('qq'),
|
||||
'google' => aksrt_inline_svg('google'),
|
||||
'weibo' => aksrt_inline_svg('weibo'),
|
||||
'weixin' => aksrt_inline_svg('wechat'),
|
||||
'baidu' => '<span class="oauth-btn__fallback">B</span>',
|
||||
'alipay' => '<span class="oauth-btn__fallback">A</span>',
|
||||
'github' => aksrt_brand_icon('github'),
|
||||
'gitee' => aksrt_brand_icon('gitee'),
|
||||
'qq' => aksrt_brand_icon('qq'),
|
||||
'google' => aksrt_brand_icon('google'),
|
||||
'weibo' => aksrt_brand_icon('weibo'),
|
||||
'weixin' => aksrt_brand_icon('weixin'),
|
||||
'baidu' => aksrt_brand_icon('baidu'),
|
||||
'alipay' => aksrt_brand_icon('alipay'),
|
||||
];
|
||||
|
||||
$bindings = [];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* AKSRT Theme - SVG Icons Module
|
||||
* AKSRT Theme — Brand / contact icons (Font Awesome 5)
|
||||
*
|
||||
* 本地 SVG 图标读取/缓存、图标 key 映射显示名称、
|
||||
* 联系方式图标下拉选项渲染
|
||||
* Short-key → FA5 class map, escaped <i> markup, contact option labels,
|
||||
* and public social-link renderer. Local SVG inventory removed.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @version 3.1.0
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -37,37 +37,150 @@ function aksrt_parse_country_list($raw) {
|
||||
endif;
|
||||
|
||||
// ============================================================
|
||||
// 本地 SVG 图标:读取 SVGs 目录并缓存
|
||||
// Brand icon map (FA 5.15.4 free)
|
||||
// ============================================================
|
||||
if (!function_exists('aksrt_inline_svg')) :
|
||||
function aksrt_inline_svg($name) {
|
||||
// 兼容 FA5 旧数据:fab fa-github / fabfa-github / fa-github → github
|
||||
$name = preg_replace('/^(fab|fas|far)[\s-]*/', '', $name);
|
||||
$name = preg_replace('/^fa[\s-]*/', '', $name);
|
||||
$name = preg_replace('/^[\s-]+/', '', $name);
|
||||
$name = trim($name, '- ');
|
||||
static $cache = array();
|
||||
if (isset($cache[$name])) return $cache[$name];
|
||||
$path = AKSRT_DIR . '/assets/img/icons/' . $name . '.svg';
|
||||
if (file_exists($path)) {
|
||||
$svg = file_get_contents($path);
|
||||
// 去除 XML 声明和 DOCTYPE
|
||||
$svg = preg_replace('/^<\?xml.*?\?>\s*/i', '', $svg);
|
||||
$svg = preg_replace('/^<!DOCTYPE[^>]*>\s*/i', '', $svg);
|
||||
// 移除 <svg> 上的固定宽高,让 CSS 控制尺寸
|
||||
$svg = preg_replace('/\swidth="[^"]*"/', '', $svg);
|
||||
$svg = preg_replace('/\sheight="[^"]*"/', '', $svg);
|
||||
// 移除 iconfont 冗余属性
|
||||
$svg = preg_replace('/\sclass="[^"]*"/', '', $svg);
|
||||
$svg = preg_replace('/\st="[^"]*"/', '', $svg);
|
||||
$svg = preg_replace('/\sp-id="[^"]*"/', '', $svg);
|
||||
$svg = preg_replace('/\sxmlns:xlink="[^"]*"/', '', $svg);
|
||||
// 移除路径上的 opacity 属性
|
||||
$svg = preg_replace('/(<(?:path|circle|rect|polygon|line|polyline|ellipse)[^>]*)\sopacity="[^"]*"/', '$1', $svg);
|
||||
$cache[$name] = $svg;
|
||||
return $svg;
|
||||
|
||||
if (!function_exists('aksrt_brand_icon_map')) :
|
||||
/**
|
||||
* Short key → FA5 class string (allowlisted).
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
function aksrt_brand_icon_map(): array {
|
||||
static $map = null;
|
||||
if ($map !== null) {
|
||||
return $map;
|
||||
}
|
||||
|
||||
// FA5 free has no bilibili/gitee brands — use solid stand-ins.
|
||||
$map = [
|
||||
'github' => 'fab fa-github',
|
||||
'google' => 'fab fa-google',
|
||||
'x' => 'fab fa-twitter',
|
||||
'twitter' => 'fab fa-twitter',
|
||||
'email' => 'fas fa-envelope',
|
||||
'envelope' => 'fas fa-envelope',
|
||||
'wechat' => 'fab fa-weixin',
|
||||
'weixin' => 'fab fa-weixin',
|
||||
'qq' => 'fab fa-qq',
|
||||
'weibo' => 'fab fa-weibo',
|
||||
'telegram' => 'fab fa-telegram-plane',
|
||||
'discord' => 'fab fa-discord',
|
||||
'bilibili' => 'fas fa-tv',
|
||||
'linkedin' => 'fab fa-linkedin-in',
|
||||
'facebook' => 'fab fa-facebook-f',
|
||||
'youtube' => 'fab fa-youtube',
|
||||
'instagram' => 'fab fa-instagram',
|
||||
'web' => 'fas fa-globe',
|
||||
'globe' => 'fas fa-globe',
|
||||
'gitee' => 'fas fa-code-branch',
|
||||
'baidu' => 'fas fa-paw',
|
||||
'alipay' => 'fab fa-alipay',
|
||||
];
|
||||
|
||||
return $map;
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_normalize_icon_key')) :
|
||||
/**
|
||||
* Normalize short key or full FA class string to a short map key.
|
||||
*
|
||||
* Examples: 'fab fa-github' | 'fabfa-github' | 'fa-github' | 'github' | 'weixin' → 'github' | 'wechat'
|
||||
*
|
||||
* @param string $name Raw icon key or FA class string.
|
||||
* @return string Short key (may be empty).
|
||||
*/
|
||||
function aksrt_normalize_icon_key(string $name): string {
|
||||
$name = trim($name);
|
||||
if ($name === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Strip style prefixes: fab/fas/far + optional space or hyphen.
|
||||
$name = preg_replace('/^(fab|fas|far)[\s-]*/i', '', $name);
|
||||
$name = preg_replace('/^fa[\s-]*/i', '', (string) $name);
|
||||
$name = trim((string) $name, "- \t\n\r\0\x0B");
|
||||
$name = strtolower($name);
|
||||
|
||||
// Aliases → canonical keys used by the map / contact options.
|
||||
$aliases = [
|
||||
'weixin' => 'wechat',
|
||||
'weixingzh' => 'wechat',
|
||||
'twitter' => 'x',
|
||||
'envelope' => 'email',
|
||||
'globe' => 'web',
|
||||
];
|
||||
if (isset($aliases[$name])) {
|
||||
return $aliases[$name];
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_brand_icon_class')) :
|
||||
/**
|
||||
* Resolve a short key or FA class string to an allowlisted FA5 class.
|
||||
*
|
||||
* @param string $name Short key or full FA class string.
|
||||
* @return string e.g. 'fab fa-github', or '' if unknown.
|
||||
*/
|
||||
function aksrt_brand_icon_class(string $name): string {
|
||||
$raw = trim($name);
|
||||
if ($raw === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Pass through already-valid full FA class strings (footer contact_more).
|
||||
if (preg_match('/^(fa[sbr]|fa)\s+fa-[\w-]+(?:\s+fa-[\w-]+)*$/i', $raw)) {
|
||||
// Prefer mapped short key when strip matches our catalog (normalizes weixin etc.).
|
||||
$key = aksrt_normalize_icon_key($raw);
|
||||
$map = aksrt_brand_icon_map();
|
||||
if ($key !== '' && isset($map[$key])) {
|
||||
return $map[$key];
|
||||
}
|
||||
// Allowlisted style + glyph only — collapse whitespace, lower style prefix.
|
||||
$parts = preg_split('/\s+/', strtolower($raw));
|
||||
$parts = array_values(array_filter((array) $parts));
|
||||
return implode(' ', $parts);
|
||||
}
|
||||
|
||||
$key = aksrt_normalize_icon_key($raw);
|
||||
if ($key === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
$map = aksrt_brand_icon_map();
|
||||
return $map[$key] ?? '';
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_brand_icon')) :
|
||||
/**
|
||||
* Escaped FA <i> markup for a brand/contact icon.
|
||||
*
|
||||
* @param string $name Short key or FA class string.
|
||||
* @param array|string $extra_classes Optional extra classes.
|
||||
* @return string Safe HTML or empty string when unknown.
|
||||
*/
|
||||
function aksrt_brand_icon(string $name, $extra_classes = []): string {
|
||||
$class = aksrt_brand_icon_class($name);
|
||||
if ($class === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (is_string($extra_classes) && $extra_classes !== '') {
|
||||
$extra_classes = preg_split('/\s+/', $extra_classes) ?: [];
|
||||
}
|
||||
if (is_array($extra_classes) && $extra_classes !== []) {
|
||||
$extra = array_filter(array_map('sanitize_html_class', $extra_classes));
|
||||
if ($extra !== []) {
|
||||
$class .= ' ' . implode(' ', $extra);
|
||||
}
|
||||
}
|
||||
|
||||
return '<i class="' . esc_attr($class) . '" aria-hidden="true"></i>';
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -76,6 +189,7 @@ endif;
|
||||
// ============================================================
|
||||
if (!function_exists('aksrt_icon_key_to_name')) :
|
||||
function aksrt_icon_key_to_name($key) {
|
||||
$key = aksrt_normalize_icon_key((string) $key);
|
||||
$map = array(
|
||||
'github' => 'GitHub', 'google' => 'Google', 'x' => 'X',
|
||||
'email' => '邮箱', 'wechat' => '微信', 'qq' => 'QQ',
|
||||
@@ -84,6 +198,9 @@ function aksrt_icon_key_to_name($key) {
|
||||
'linkedin' => 'LinkedIn', 'facebook' => 'Facebook',
|
||||
'youtube' => 'YouTube', 'instagram' => 'Instagram',
|
||||
'web' => '网站',
|
||||
'gitee' => 'Gitee',
|
||||
'baidu' => 'Baidu',
|
||||
'alipay' => 'Alipay',
|
||||
);
|
||||
return isset($map[$key]) ? $map[$key] : ucwords(str_replace('-', ' ', $key));
|
||||
}
|
||||
@@ -111,6 +228,7 @@ function aksrt_contact_icon_options($selected = '') {
|
||||
'instagram' => 'Instagram',
|
||||
'web' => '网站',
|
||||
);
|
||||
$selected = aksrt_normalize_icon_key((string) $selected);
|
||||
$html = '<option value="">—</option>';
|
||||
foreach ($icons as $key => $label) {
|
||||
$sel = $key === $selected ? ' selected' : '';
|
||||
@@ -119,3 +237,55 @@ function aksrt_contact_icon_options($selected = '') {
|
||||
return $html;
|
||||
}
|
||||
endif;
|
||||
|
||||
// ============================================================
|
||||
// Public social links (author hero / profile)
|
||||
// ============================================================
|
||||
if (!function_exists('aksrt_render_social_links')) :
|
||||
/**
|
||||
* Echo a list of public contact links with FA icons.
|
||||
*
|
||||
* @param array<int, array{name?:string,url?:string,icon?:string,title?:string,label?:string}> $contacts
|
||||
*/
|
||||
function aksrt_render_social_links(array $contacts): void {
|
||||
$links = [];
|
||||
foreach ($contacts as $contact) {
|
||||
if (!is_array($contact)) {
|
||||
continue;
|
||||
}
|
||||
$url = isset($contact['url']) ? (string) $contact['url'] : '';
|
||||
$icon = isset($contact['icon']) ? (string) $contact['icon'] : '';
|
||||
if ($url === '' || $icon === '') {
|
||||
continue;
|
||||
}
|
||||
$icon_html = aksrt_brand_icon($icon);
|
||||
if ($icon_html === '') {
|
||||
$icon_html = '<i class="fas fa-globe" aria-hidden="true"></i>';
|
||||
}
|
||||
$label = (string) ($contact['name'] ?? $contact['title'] ?? $contact['label'] ?? '');
|
||||
if ($label === '') {
|
||||
$label = aksrt_icon_key_to_name($icon);
|
||||
}
|
||||
$links[] = [
|
||||
'url' => $url,
|
||||
'label' => $label,
|
||||
'icon' => $icon_html,
|
||||
];
|
||||
}
|
||||
|
||||
if ($links === []) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div class="profile-social-links">';
|
||||
foreach ($links as $link) {
|
||||
printf(
|
||||
'<a class="social-icon-link" href="%1$s" target="_blank" rel="noopener noreferrer" title="%2$s" aria-label="%2$s">%3$s</a>',
|
||||
esc_url($link['url']),
|
||||
esc_attr($link['label']),
|
||||
$link['icon'] // pre-escaped via aksrt_brand_icon / fixed globe fallback
|
||||
);
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -205,7 +205,7 @@ if (!function_exists('aksrt_render_share_dropdown')) :
|
||||
<div class="share-dropdown__grid">
|
||||
<button type="button" class="share-item" data-platform="qq"><i class="fab fa-qq"></i><span>QQ</span></button>
|
||||
<button type="button" class="share-item" data-platform="weibo"><i class="fab fa-weibo"></i><span>微博</span></button>
|
||||
<button type="button" class="share-item" data-platform="twitter"><i class="fab fa-x-twitter"></i><span>X</span></button>
|
||||
<button type="button" class="share-item" data-platform="twitter"><i class="fab fa-twitter"></i><span>X</span></button>
|
||||
<button type="button" class="share-item" data-platform="wechat"><i class="fab fa-weixin"></i><span>微信</span></button>
|
||||
<button type="button" class="share-item" data-platform="copy"><i class="fas fa-link"></i><span><?php esc_html_e('复制链接', 'aksrt'); ?></span></button>
|
||||
<button type="button" class="share-item" data-platform="poster"><i class="fas fa-image"></i><span><?php esc_html_e('海报分享', 'aksrt'); ?></span></button>
|
||||
|
||||