Avatar

<!-- Error rendering component -->
<!-- TwigException: Unable to find filter resize -->
<!-- Error: TwigException: Unable to find filter resize
    at /builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/twig/src/adapter.js:156:24
    at new Promise (<anonymous>)
    at TwigAdapter.render (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/twig/src/adapter.js:134:16)
    at ComponentSource._renderVariant (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/@frctl/fractal/src/api/components/source.js:212:30)
    at _renderVariant.next (<anonymous>)
    at onFulfilled (/builds/michaelhulsman/footballrs.net/htdocs/content/themes/footballrs.net/node_modules/co/index.js:65:19) -->
{# --BLUEPRINT DO NOT REMOVE--

/--BLUEPRINT DO NOT REMOVE-- #}
<span class="avatar">
    {% if avatar is not empty %}
    <img src="{{ avatar|towebp|resize(92,92) }}" width="46" height="46">
    {% else %}
    <span class="fallback-logo">
        {% include '@atoms/icon/icon.twig' with {
            icon: 'member'
        } %}
    </span>
    {% endif %}
</span>
{
  "avatar": {
    "default": {
      "src": "https://loremflickr.com/100/100/people",
      "alt": "Pariatur tempora perferendis in sit.",
      "width": 100,
      "height": 100
    },
    "sources": [
      {
        "src": "https://loremflickr.com/100/100/people",
        "media": "(max-width: 2560px)"
      }
    ]
  }
}
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\avatar;
    
    use ACFToolkit\Types\CustomAtom;
    
    
    class Avatar extends CustomAtom
    {
        public string $name = 'avatar';
        public string $label = 'Avatar';
        public int $needsJs = 0;
        public int $needsVue = 0;
        public int $needsVueInitialisation = 0;
    
        public function __construct($name = '', $title = '', $children = [])
        {
            parent::__construct($name, $title);
            $this->addChildren(array_merge($children, [
            ]));
        }
    }
  • URL: /components/raw/avatar/Avatar.php
  • Filesystem Path: resources/Views/Atoms/avatar/Avatar.php
  • Size: 485 Bytes
  • Content:
    <?php
    
    namespace Theme\Views\Atoms\avatar;
    
    use ACFToolkit\ViewModels\BaseViewModel;
    
    class AvatarViewModel extends BaseViewModel
    {
    }
    
  • URL: /components/raw/avatar/AvatarViewModel.php
  • Filesystem Path: resources/Views/Atoms/avatar/AvatarViewModel.php
  • Size: 134 Bytes
  • Content:
    .avatar {
      @apply inline-block border-white border-2 rounded-full overflow-hidden;
    
      .fallback-logo {
        @apply flex items-center justify-center bg-white;
        width: 46px;
        height: 46px;
    
        i {
          width: 26px;
          height: 26px;
        }
      }
    }
    
  • URL: /components/raw/avatar/avatar.scss
  • Filesystem Path: resources/Views/Atoms/avatar/avatar.scss
  • Size: 253 Bytes

title: Avatar

{% include '@atoms/avatar/avatar.twig' with {

} only %}

ACF

Fields