<i class="player"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
        <title>player</title>
        <g id="player">
            <path d="M46,29H44.85a1,1,0,0,1-1-1.15A12.49,12.49,0,0,0,44,26V20a1,1,0,0,1,1-1h1a5,5,0,0,1,0,10Zm0-2h0a3,3,0,0,0,3-3,3,3,0,0,0-3-3v5C46,26.34,46,26.67,46,27Z" />
            <path d="M19.15,29H18a5,5,0,0,1,0-10h1a1,1,0,0,1,1,1v6a12.49,12.49,0,0,0,.14,1.85,1,1,0,0,1-1,1.15ZM18,21a3,3,0,0,0-1.5.41,3.06,3.06,0,0,0-.64.48A3,3,0,0,0,18,27h0c0-.33,0-.66,0-1Z" />
            <path d="M16,21.54a1,1,0,0,1-.5-.13,1,1,0,0,1-.5-.87V17a14,14,0,0,1,3.34-9.07,1,1,0,0,1,1.74.45A4.52,4.52,0,0,0,24.5,12H25a1,1,0,0,1,0,2,5,5,0,0,0-5,5v1a1,1,0,0,1-1,1H18a3,3,0,0,0-1.5.41A1,1,0,0,1,16,21.54Zm2.82-10.88A12,12,0,0,0,17,17v2.1a4.78,4.78,0,0,1,1-.1,7,7,0,0,1,3.22-5.89A6.64,6.64,0,0,1,18.82,10.66Z" />
            <path d="M48,21.54a1,1,0,0,1-.5-.13A3,3,0,0,0,46,21H45a1,1,0,0,1-1-1V19a5,5,0,0,0-5-5H36a1,1,0,0,1,0-2,8,8,0,0,0,7.25-4.64A1,1,0,0,1,44,6.8a1,1,0,0,1,.88.27A13.87,13.87,0,0,1,49,17v3.54a1,1,0,0,1-.5.87A1,1,0,0,1,48,21.54ZM46,19a4.78,4.78,0,0,1,1,.1V17a11.94,11.94,0,0,0-2.64-7.52,9.94,9.94,0,0,1-3,2.94A7,7,0,0,1,46,19Z" />
            <path d="M32,40A14,14,0,0,1,18.16,28.15,13.77,13.77,0,0,1,18,26V19a7,7,0,0,1,7-7H39a7,7,0,0,1,7,7v7a13.77,13.77,0,0,1-.16,2.15A14,14,0,0,1,32,40ZM25,14a5,5,0,0,0-5,5v7a12.49,12.49,0,0,0,.14,1.85,12,12,0,0,0,23.72,0A12.49,12.49,0,0,0,44,26V19a5,5,0,0,0-5-5Z" />
            <path d="M32,52.42a4,4,0,0,1-2.83-1.17l-4.7-4.71A4.94,4.94,0,0,1,23,43a1,1,0,0,1,1-1h4a1,1,0,0,1,.71.29L32,45.59l3.29-3.3A1,1,0,0,1,36,42h4a1,1,0,0,1,1,1,4.94,4.94,0,0,1-1.47,3.54l-4.7,4.71A4,4,0,0,1,32,52.42ZM25.17,44a3.13,3.13,0,0,0,.71,1.13l4.71,4.7a2,2,0,0,0,2.82,0l4.71-4.7A3.13,3.13,0,0,0,38.83,44H36.41l-3.7,3.71a1,1,0,0,1-1.42,0L27.59,44Z" />
            <path d="M32,48a1,1,0,0,1-.71-.29l-4-4A1,1,0,0,1,27,43V38.37a1,1,0,0,1,1.31-.95,12.08,12.08,0,0,0,7.38,0,1,1,0,0,1,1.31.95V43a1,1,0,0,1-.29.71l-4,4A1,1,0,0,1,32,48Zm-3-5.41,3,3,3-3V39.68a14.11,14.11,0,0,1-6,0Z" />
            <path d="M55,63H9a1,1,0,0,1-1-1V53a9,9,0,0,1,2.07-5.74A12,12,0,0,1,20,42h8a1,1,0,0,1,.71.29L32,45.59l3.29-3.3A1,1,0,0,1,36,42h8a12,12,0,0,1,10,5.3A8.94,8.94,0,0,1,56,53v9A1,1,0,0,1,55,63ZM10,61H54V53a6.88,6.88,0,0,0-1.54-4.37l-.07-.09-.09-.12A10,10,0,0,0,44,44H36.41l-3.7,3.71a1,1,0,0,1-1.42,0L27.59,44H20a10,10,0,0,0-8.3,4.42l-.06.08A7,7,0,0,0,10,53Z" />
            <path d="M55,54H47.5a3.5,3.5,0,1,1,0-7h5.74a1,1,0,0,1,.78.37A8.89,8.89,0,0,1,56,53,1,1,0,0,1,55,54Zm-7.5-5a1.48,1.48,0,0,0-1.06.44A1.5,1.5,0,0,0,47.5,52h6.43a6.87,6.87,0,0,0-1.19-3Z" />
            <path d="M16.5,54H9a1,1,0,0,1-1-1,8.89,8.89,0,0,1,2-5.63,1,1,0,0,1,.78-.37H16.5A3.52,3.52,0,0,1,19,48a3.51,3.51,0,0,1-2.48,6Zm-6.43-2H16.5a1.5,1.5,0,0,0,1.06-2.56A1.48,1.48,0,0,0,16.5,49H11.26A6.87,6.87,0,0,0,10.07,52Z" />
            <path d="M30,63H22a1,1,0,0,1-1-1V57a1,1,0,0,1,.29-.71l2-2A1,1,0,0,1,24,54h4a1,1,0,0,1,.71.29l2,2A1,1,0,0,1,31,57v5A1,1,0,0,1,30,63Zm-7-2h6V57.41L27.59,56H24.41L23,57.41Z" />
            <path d="M42,63H34a1,1,0,0,1-1-1V57a1,1,0,0,1,.29-.71l2-2A1,1,0,0,1,36,54h4a1,1,0,0,1,.71.29l2,2A1,1,0,0,1,43,57v5A1,1,0,0,1,42,63Zm-7-2h6V57.41L39.59,56H36.41L35,57.41Z" />
            <path d="M36,14H24.5a6.54,6.54,0,0,1-6.38-5.22A7.72,7.72,0,0,1,18,7.5,6.49,6.49,0,0,1,24.5,1H45a1,1,0,0,1,1,1V4a9.87,9.87,0,0,1-.93,4.21A10,10,0,0,1,36,14ZM24.5,3A4.51,4.51,0,0,0,20,7.5a6.23,6.23,0,0,0,.08.91A4.52,4.52,0,0,0,24.5,12H36a8,8,0,0,0,7.25-4.64A7.81,7.81,0,0,0,44,4V3Z" />
            <path d="M27,30H24a1,1,0,0,1,0-2h3a1,1,0,0,1,0,2Z" />
            <path d="M40,30H37a1,1,0,0,1,0-2h3a1,1,0,0,1,0,2Z" />
        </g>
    </svg></i>
{% set className = className ? className ~ ' ' : '' %}
{% set attributes = className ~ icon | trim %}
{% set insert = true %}
{% if iconType is empty or iconType == 'custom' %}
<i class="{{ attributes }}">{% if insert is defined and insert == true %}{{ source('@customIcons/' ~ icon ~ '.svg') }}{% endif %}</i>
{% elseif iconType is not empty or iconType == 'iconoir' %}
<i class="{{ attributes }}">{% if insert is defined and insert == true %}{{ source('@icons/' ~ icon ~ '.svg') }}{% endif %}</i>
{% endif %}
{
  "icon": "player"
}
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\icon;
    
    use ACFToolkit\Traits\SetWrapperWidth;
    use ACFToolkit\Types\CustomAtom;
    
    
    class Icon extends CustomAtom
    {
        use SetWrapperWidth;
    
        public string $name = 'icon';
        public string $label = 'Icon';
        public int $needsJs = 0;
        public int $needsVue = 1;
        public int $needsVueInitialisation = 0;
    
        public function __construct($name = '', $title = '', $children = [])
        {
            parent::__construct($name, $title);
            $this->addChildren(array_merge($children, [
            ]));
        }
    
        public function getChoices()
        {
            $customIcons = get_template_directory().'/resources/Views/Assets/dist/custom-icons/*.svg';
    
            $result = [];
            $files = glob($customIcons);
            foreach($files as $file) {
                $filename = basename($file, '.svg');
                $result[$filename] = $filename;
            }
            return $result;
        }
    }
  • URL: /components/raw/icon/Icon.php
  • Filesystem Path: resources/Views/Atoms/icon/Icon.php
  • Size: 909 Bytes
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\icon;
    
    use ACFToolkit\ViewModels\BaseViewModel;
    
    class IconViewModel extends BaseViewModel
    {
    }
    
  • URL: /components/raw/icon/IconViewModel.php
  • Filesystem Path: resources/Views/Atoms/icon/IconViewModel.php
  • Size: 130 Bytes
  • Content:
    i {
      display: inline-block;
      width: 26px;
    
      svg {
        width: 100%;
        vertical-align: top;
      }
    
      &.sm {
        width: 20px;
      }
    
      &.md {
        width: 40px;
      }
    
      &.lg {
        width: 50px;
      }
    
      &.xl {
        width: 60px;
      }
    
      &.star--filled {
        svg {
          g {
            fill: theme('colors.primary');
          }
        }
      }
    
      &.logo {
        svg {
          g {
            fill: theme('colors.primary');
          }
        }
      }
    
      &.logo--white {
        svg {
          g {
            fill: #fff;
          }
        }
      }
    
      &.logo_subline {
        svg {
          g {
            fill: theme('colors.primary');
          }
        }
      }
    
      &.logo_subline--white {
        svg {
          g {
            fill: #fff;
          }
        }
      }
    
      &.logo_subline-subline--accent {
        svg {
          g {
            fill: theme('colors.primary');
    
            &#subline {
              fill: theme('colors.accent');
            }
          }
        }
      }
    
      &.logo_subline--white-subline--accent {
        svg {
          g {
            fill: #fff;
    
            &#subline {
              fill: theme('colors.accent');
            }
          }
        }
      }
    
      &.search {
        width: 24px;
        height: 24px;
      }
    }
  • URL: /components/raw/icon/icon.scss
  • Filesystem Path: resources/Views/Atoms/icon/icon.scss
  • Size: 1.1 KB
  • Content:
    <template>
      <i
        :class="getTypeClass + '-' + icon + ' ' + className"
        v-html="iconSource"
        :title="title"
        v-if="iconSource"
      ></i>
    </template>
    <script>
      import IconService from '../../Assets/src/js/services/IconService';
    
      export default {
        props: {
          className: {
            type: String,
            default: ''
          },
          icon: {
            type: String,
          },
          title: {
            type: String
          },
          type: {
            type: String,
            default: 'custom'
          }
        },
        data: () => {
          return {
            iconSource: null
          }
        },
        computed: {
            getTypeClass(){
              return this.type === 'custom' ? 'custom' : 'iconoir'
            }
        },
        async created(){
          const {data} = this.type === 'custom' ?
            await IconService.getCustom(this.icon) :
            await IconService.getIconoir(this.icon)
          this.iconSource = data
        }
      }
    </script>
    <style>
    *[class^="iconoir-"], *[class*=" iconoir-"] {
      display: inline-block;
    }
    </style>
  • URL: /components/raw/icon/icon.vue
  • Filesystem Path: resources/Views/Atoms/icon/icon.vue
  • Size: 1 KB

title: Icon

{% include '@atoms/icon/icon.twig' with {
    icon: 'icon'
} only %}

ACF

Fields