flexdashboard icon indicating copy to clipboard operation
flexdashboard copied to clipboard

modify the components of social option with dropdown menu

Open ozturkib opened this issue 4 years ago • 1 comments

How can I modify the components of social option with dropdown menu ?

social: [ "twitter", "facebook", "linkedin"] This option does not combine those three in drop down menu. Hence, mobile view is weird.

social: menu This option combines components but i cannot change what are the components.

Basically what I need is similar to "menu" but I would like to able to change what are the components inside the menu. Is it possible ? Thanks

ozturkib avatar Apr 25 '20 12:04 ozturkib

Hi there, I've had this same question for several months now, but wasn't able to find the answer. Turns out I had to do some digging. Instead of defining the links you want to include on the right side of the navbar in the yaml, create an html file that includes some variation of this:

<script id="flexdashboard-navbar" type="application/json"> [{"title":"Links","items":[{"title":"ESPN","href":"espn.com","target":"_blank","align":"right"},{"title":"Google","href":"google.com","target":"_blank","align":"right"}]}] </script>

If you want to keep the social icon instead of text, replace "title":"Links","items": with "icon":"fa-share-alt","items": Then refer to that html file in the yaml instead:

flex_yaml

At this point, you may no longer care, but sharing anyways in the hopes that I can prevent any other poor soul with zero JS or html background from spending hours in vain trying to implement what seems like it should be an easy and doable adjustment.

Mike-Henderson1 avatar Dec 03 '21 06:12 Mike-Henderson1