UNPKG

@eightshift/frontend-libs

Version:

A collection of useful frontend utility modules. powered by Eightshift

87 lines (86 loc) 11 kB
{ "$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs/develop/schemas/component.json", "componentName": "social-networks", "title": "Social networks", "componentClass": "social-networks", "componentJsClass": "js-social-networks", "example": { "attributes": { "socialNetworksUse": true } }, "attributes": { "socialNetworksNetworks": { "type": "array", "default": [ { "id": "facebook", "enabled": true }, { "id": "twitter", "enabled": true }, { "id": "linkedin", "enabled": true }, { "id": "youtube", "enabled": true }, { "id": "instagram", "enabled": true }, { "id": "pinterest", "enabled": true } ] }, "socialNetworksShareMode": { "type": "boolean", "default": false }, "socialNetworksUse": { "type": "boolean", "default": true } }, "networks": { "facebook": { "url": "https://www.facebook.com/infinumcom", "title": "Facebook", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path d='M139.354 37.754h19.025V3.02h-34.572c-2.883-.12-38.04-.793-47.153 33.956-.132.365-3.043 8.626-3.043 27.931L42 65.002v36.429l31.652-.093v96.082H122v-96h32V64.896h-32V53.404c0-7.14 3.01-15.65 17.354-15.65ZM146 72.896V93.42h-32v96H81.652V93.314L50 93.408v-20.43l31.734-.093-.082-4.069c-.414-20.447 2.5-29.049 2.631-29.459 7.863-29.93 37.891-28.422 39.18-28.344l26.916.008v18.733h-11.025C120.66 29.754 114 41.97 114 53.404v19.492h32Z' fill='currentColor'/></svg>", "shareUrl": "https://www.facebook.com/sharer/sharer.php?u=POST_URL" }, "twitter": { "url": "https://twitter.com/infinum", "title": "Twitter", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path d='M197.362 38.045a3.736 3.736 0 0 0-4.341.115c-1.673 1.267-4.395 2.273-7.326 3.047 7.632-8.543 7.796-14.247 7.714-15.56a3.728 3.728 0 0 0-5.912-2.779c-8.583 6.234-17.133 7.55-22.219 7.683C157.474 23.09 147.336 19 136.551 19c-23.095 0-41.883 19.023-41.883 42.406 0 2.009.14 4.018.42 6.006-40.024-.453-72.526-38.77-72.861-39.17a3.728 3.728 0 0 0-6.092.525c-11.519 19.966-3.811 37.502 3.234 47.541-1.247-.664-2.257-1.318-2.859-1.762a3.728 3.728 0 0 0-5.954 2.928c-.31 19.023 8.855 29.922 17.471 35.946a3.76 3.76 0 0 0-3.112 1.184 3.724 3.724 0 0 0-.825 3.61c5.952 19.467 20.568 26.081 29.87 28.325-19.124 14.873-47.264 10.087-47.575 10.033a3.728 3.728 0 0 0-4.07 2.168 3.72 3.72 0 0 0 1.15 4.458C23.65 178.59 47.792 182 65.232 182c13.19-.002 22.55-1.953 23.445-2.148 88.332-20.914 90.819-101.758 90.617-115.008 16.582-15.408 19.174-21.276 19.574-22.727a3.725 3.725 0 0 0-1.505-4.072Zm-24.371 22.477a3.733 3.733 0 0 0-1.194 2.99c.235 3.576 4.753 87.881-84.77 109.077-.405.086-35.99 7.505-66.84-7.765 13.033-.362 31.723-3.773 44.743-18.38a3.716 3.716 0 0 0 .61-4.018 3.727 3.727 0 0 0-3.393-2.183h-.038c-.185.119-19.76-.021-28.72-18.627 3.61.204 8.06-.018 11.603-1.649a3.724 3.724 0 0 0-.794-7.027c-1.002-.211-22.792-5.079-25.84-28.83 3.306 1.444 7.534 2.626 11.72 1.987a3.724 3.724 0 0 0 1.886-6.497c-.932-.811-21.397-18.983-11.694-42.419 10.533 11.042 41.734 39.74 79.532 37.57a3.73 3.73 0 0 0 2.79-1.514 3.72 3.72 0 0 0 .61-3.112 35.848 35.848 0 0 1-1.079-8.72c0-19.276 15.445-34.956 34.428-34.956 9.286 0 17.996 3.702 24.523 10.427a3.729 3.729 0 0 0 2.612 1.131c3.949.054 10.445-.41 17.78-3.348-2.117 2.631-5.226 5.788-9.799 9.376a3.723 3.723 0 0 0-1.169 4.286c.601 1.533 2.15 2.5 3.769 2.355a84.34 84.34 0 0 0 10.304-1.542c-2.727 2.939-6.465 6.687-11.58 11.388Z' fill='currentColor'/></svg>", "shareUrl": "https://twitter.com/intent/tweet?url=POST_URL&text=POST_TITLE" }, "linkedin": { "url": "https://www.linkedin.com/company/infinum/", "title": "LinkedIn", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path d='M29.566 10C17.07 10 8 18.617 8 30.488c0 11.864 8.89 20.475 21.137 20.475 6.351 0 11.824-2.059 15.828-5.955 3.84-3.738 5.957-8.895 5.953-14.614C50.637 18.387 41.855 10 29.566 10Zm9.82 29.273c-2.48 2.415-6.027 3.69-10.25 3.69C21.403 42.963 16 37.834 16 30.488 16 23.02 21.453 18 29.566 18c7.934 0 13.172 4.94 13.352 12.49 0 3.448-1.254 6.566-3.531 8.783ZM11.836 189.9h35.953V57.723H11.836V189.9Zm8-124.177h19.953V181.9H19.836V65.723Zm122.758-8c-16.672 0-26.879 5.753-32.793 11.166l-1.125-11.166H68V189.9h39.836v-69.471c0-2.992 1.211-9.205 1.973-10.845 4.812-10.365 11.304-10.365 21.136-10.365 11.324 0 20.891 10.619 20.891 23.187V189.9h40v-74.681c0-39.504-25.527-57.496-49.242-57.496ZM183.836 181.9h-24v-59.494c0-16.906-13.231-31.187-28.891-31.187-10.047 0-21.434 0-28.394 14.998-1.438 3.099-2.715 10.529-2.715 14.212V181.9H76V65.723h25.441l1.633 16.177h6.555l1.172-1.89c2.668-4.295 11.105-14.287 31.793-14.287 19.863 0 41.242 15.488 41.242 49.496V181.9Z' fill='currentColor'/></svg>", "shareUrl": "https://www.linkedin.com/sharing/share-offsite/?url=POST_URL" }, "youtube": { "url": "https://www.youtube.com/channel/UCQV7qsvmrpe8IbCWZsv3Low", "title": "YouTube", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path d='M159.023 28H40.976C19.484 28 2 45.54 2 67.098v65.804C2 154.461 19.484 172 40.976 172h118.047C180.515 172 198 154.461 198 132.902V67.098C198 45.539 180.515 28 159.023 28ZM190 132.902C190 150.049 176.103 164 159.023 164H40.976C23.896 164 10 150.049 10 132.902V67.098C10 49.95 23.896 36 40.976 36h118.047C176.103 36 190 49.951 190 67.098v65.804Z' fill='currentColor'/><path d='m135.441 98.551-55.42-32.46A4 4 0 0 0 74 69.541v64.914a4.003 4.003 0 0 0 4.001 4c.7 0 1.396-.184 2.022-.549l55.419-32.453a4 4 0 0 0 0-6.903ZM82 127.477V76.52l43.504 25.483L82 127.477Z' fill='currentColor'/></svg>" }, "instagram": { "url": "https://www.instagram.com/infinumcom/", "title": "Instagram", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path opacity='0.8' fill-rule='evenodd' clip-rule='evenodd' d='M6 47C6 24.356 24.356 6 47 6h106c22.644 0 41 18.356 41 41v106c0 22.644-18.356 41-41 41H47c-22.644 0-41-18.356-41-41V47Zm41-33c-18.225 0-33 14.775-33 33v106c0 18.225 14.775 33 33 33h106c18.225 0 33-14.775 33-33V47c0-18.225-14.775-33-33-33H47Z' fill='currentColor'/><path opacity='0.8' fill-rule='evenodd' clip-rule='evenodd' d='M100 62c-20.987 0-38 17.013-38 38s17.013 38 38 38 38-17.013 38-38-17.013-38-38-38Zm-46 38c0-25.405 20.595-46 46-46s46 20.595 46 46-20.595 46-46 46-46-20.595-46-46Zm92.5-51a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm-6.5-1.5a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z' fill='currentColor'/></svg>" }, "pinterest": { "title": "Pinterest", "icon": "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none'><path d='M175.575 50.3c-3.019-10.137-7.869-18.67-14.829-26.087-6.806-7.253-14.636-12.754-23.944-16.817-10.6-4.616-22.888-6.858-34.629-6.317-4.283.195-8.466.419-12.567 1.009C78.05 3.731 67.878 7.153 58.504 12.554c-11.962 6.897-21.301 16.281-27.757 27.893-3.353 6.042-6.655 16.697-8.06 23.654-1.66 8.204-.197 22.434 3.136 30.46 4.163 10.002 7.59 14.435 15.943 20.622.05.037 5.214 3.733 8.656 3.678 6.266-.12 7.512-6.076 8.11-8.939.112-.54.22-1.076.352-1.578.117-.443.268-.917.42-1.411.884-2.844 2.09-6.737.088-10.188-.752-1.294-1.64-2.3-2.425-3.186-.426-.482-.853-.947-1.199-1.46-2.971-4.386-4.477-9.875-4.477-16.313 0-8.448 1.925-16.099 5.882-23.389 7.182-13.223 19.101-21.57 34.474-24.142 8.749-1.456 18.942-.847 26.593 1.589 6.988 2.227 12.936 6.166 17.204 11.397 4.517 5.536 7.101 12.558 7.671 20.874.373 5.308-.112 10.653-.512 14.205-1.545 13.667-5.549 24.668-11.896 32.705-5.199 6.594-10.806 9.901-17.146 10.113-4.082.158-7.131-.671-9.89-2.634-2.604-1.845-4.152-4.118-4.88-7.148-.827-3.458.17-7.045 1.229-10.841l.171-.608c.927-3.341 1.893-6.393 2.844-9.398 1.493-4.733 3.041-9.629 4.318-15.305 1.443-6.41 1.634-11.584.59-15.817-1.288-5.252-4.129-9.186-8.443-11.696-4.567-2.647-11.035-3.156-16.463-1.297-8.094 2.745-14.267 10.049-16.94 20.039-1.354 5.074-1.75 10.4-1.164 15.82.45 4.25 1.405 8.11 3.174 12.774-.058.203-.124.415-.186.62-.128.417-.245.818-.33 1.164a6785.425 6785.425 0 0 0-5.603 23.458 7149.71 7149.71 0 0 1-5.3 22.193l-.404 1.668c-1.835 7.583-3.728 15.424-4.166 24.786l-.198 3.91c-.389 7.273-.784 14.795.198 21.753.193 1.358.624 4.402 3.639 5.467.9.672 1.77.954 2.611.954 2.522 0 4.768-2.547 6.678-4.707 6.235-7.045 11.535-15.94 16.206-27.188 2.092-5.031 3.477-10.443 4.815-15.68l.807-3.12a1386.24 1386.24 0 0 0 2.883-11.247l.063-.248c1.76 1.531 3.794 2.913 6.15 4.195 4.985 2.744 10.611 4.342 16.714 4.749 5.723.386 11.745-.343 18.391-2.238a54.373 54.373 0 0 0 14.372-6.462c16.106-10.25 27.086-28.181 30.916-50.488C177.511 79.9 178 74.542 178 68.65c0-6.799-.815-12.975-2.425-18.35Zm-7.042 34.935c-3.454 20.092-13.173 36.132-27.37 45.167a46.45 46.45 0 0 1-12.276 5.521c-5.746 1.64-10.879 2.279-15.663 1.953-5.01-.335-9.394-1.571-13.425-3.791-4.032-2.192-6.647-4.574-8.482-7.718l-4.873-8.363-4.392 17.126c-.943 3.718-1.894 7.474-2.868 11.183l-.814 3.166c-1.331 5.195-2.585 10.102-4.462 14.61-4.183 10.078-8.854 18.049-14.26 24.335-.422-5.35-.104-11.351.206-17.184l.202-3.956c.4-8.615 2.208-16.085 3.954-23.308l.407-1.677c1.793-7.448 3.546-14.828 5.304-22.214 1.847-7.767 3.694-15.545 5.595-23.423.054-.222.136-.483.217-.754.478-1.593.974-3.237.303-4.91-1.703-4.34-2.604-7.8-3.003-11.578-.478-4.462-.163-8.821.946-12.959 1.98-7.394 6.29-12.714 11.835-14.596 1.373-.469 2.813-.67 4.194-.67 2.254 0 4.341.537 5.684 1.316 2.413 1.404 3.962 3.61 4.73 6.752.737 2.987.527 7.098-.621 12.217-1.207 5.35-2.635 9.874-4.148 14.663-.978 3.088-1.967 6.225-2.921 9.66l-.167.6c-1.222 4.381-2.608 9.344-1.304 14.785 1.183 4.927 3.798 8.768 7.989 11.743 4.163 2.958 9.052 4.28 14.779 4.101 8.706-.291 16.486-4.711 23.128-13.131 7.276-9.207 11.83-21.553 13.545-36.704.431-3.862.959-9.683.544-15.626-.691-9.968-3.861-18.481-9.429-25.305-5.242-6.424-12.485-11.247-20.952-13.942-8.784-2.802-20.408-3.517-30.333-1.859-17.88 2.993-31.762 12.736-40.15 28.18-4.602 8.472-6.837 17.35-6.837 27.14 0 8.039 1.959 15.01 5.828 20.72.531.79 1.167 1.526 1.827 2.268.594.671 1.153 1.303 1.494 1.892.24.644-.45 2.87-.784 3.941a45.628 45.628 0 0 0-.508 1.725 41.49 41.49 0 0 0-.454 1.986c-.155.744-.392 1.892-.644 2.522-.943-.366-2.662-1.305-3.593-1.992-7.14-5.284-9.758-8.682-13.343-17.303-2.69-6.478-4.024-19.3-2.69-25.887 1.49-7.38 4.664-16.777 7.225-21.391 5.75-10.34 14.089-18.712 24.79-24.88 8.473-4.883 17.708-7.983 28.246-9.481 3.748-.54 7.721-.75 11.803-.935 10.53-.492 21.569 1.519 31.067 5.659 8.295 3.62 15.272 8.516 21.324 14.972 6.104 6.5 10.36 14.004 13.022 22.945 1.393 4.648 2.099 10.068 2.099 16.104 0 5.421-.454 10.382-1.521 16.585Z' fill='currentColor'/></svg>", "shareUrl": "https://pinterest.com/pin/create/button/?url=POST_URL&media=POST_FEATURED_IMAGE&description=POST_TITLE" } } }