So, post-vdom’ing of the header, this old code:
<script type='text/x-handlebars' data-template-name='/connectors/header-after-home-logo/add-header-links'>
{{#unless showExtraInfo}}
<a id="recruiter" href="http://sih.onemadogre.com/t/joining-sih/494">Join us!</a>
<a id="about" href="http://sih.onemadogre.com/c/guild-news-announcements/about-the-guild">About SiH</a>
{{/unless}}
</script>
doesn’t work, so I’ve replaced it with:
note: this code works fine as of, like, early May? anyway my comments below can be ignored
<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('home-logo:after', helper => {
const showExtraInfo = helper.attrs.minimized;
if(!showExtraInfo) {
return helper.h('div#header-links', [
helper.h('a#recruiter', {
href:'/t/joining-sih/494',
text:'Join Us!'
}),
helper.h('a#about', {
href:'/c/guild-news-announcements/about-the-guild',
text:'About SiH'
})
]);
}
});
</script>
Which almost works (some css needed to reposition div#header-links, but nbd), except that my links just refresh the page.
I realize this is less a Discourse specific question and probably more a “Yuun’s making a dumb syntax error” question, but I’d appreciate it if someone could give it a look over nonetheless.
Thanks in advance, generous stranger.
Clarification: my links don’t refresh the page, they just always go to the home page. The hover text for each link is correct, but I guess it’s being overridden by the home logo’s href?