getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[typhoon] Last.fm in Social links #406

Open EvgenyADE opened 10 months ago

EvgenyADE commented 10 months ago

Hi Is it possible to add Last.fm to the social links?

rhukster commented 9 months ago

So i've decided rather than just adding every single social network into the CSS and dropdown, a better solution is to provide custom fields. This will be in the next Typhoon release and to get lastfm to look decent you would have:

    -
      network: custom                                               # Social icon for network (choose custom to add your own)
      custom:
         network: Last FM                                           # Custom network name
         icon: 'tabler/brand-lastfm.svg'                            # Custom icon (svg_icons style format)
         colors: 'bg-red-500 text-white'                            # Custom icon colors in the format of 'bg-xxx text-xxx' (optional);
      link: https://lastfm.com/getgrav                              # External URL for network
      newtab: true                                                  # Open in new tab

FYI, updated with slightly tweaked format.

aleclerc7 commented 8 months ago

Nice improvement! Thank you!

thespad commented 7 months ago

Whatever I try I can't get the custom network to display (obviously, have updated to 2.4.5). It adds the anchor to the page footer, but not the icon. I've tried to keep it as simple as possible:

    -
      network: custom
      custom:
         network: Mastodon
         icon: 'user/assets/lsio/brand-mastodon.svg'
      link: 'https://mastodon.linuxserver.io/@linuxserver'

Tried a few different locations for the icon but it doesn't seem to make a difference, the page just shows an empty anchor:

<a href="https://mastodon.linuxserver.io/@linuxserver" aria-label="custom" class="text-custom  hover:filter hover:brightness-110 transition duration-300">

            </a>
aleclerc7 commented 7 months ago

Hello @thespad,

I think, using "svg icons", you should put your image in [theme]/images/icons (create the icons folder if it does not exist), and then simply put your icon's name: icon: 'brand-mastodon.svg'.

I did not try yet this new feature (#374) but I think it might solve your problem.

Kind regards.

thespad commented 7 months ago

Yeah I've tried that, as well as tabler/brand-mastodon.svg (I've checked, it's there in the plugin icons folder), but still just get an empty anchor element on the page.