Спасибо за вашу помощь (особенно для новичков)
Вот весь код
<script type="text/discourse-plugin" version="0.8.25">
const user = api.getCurrentUser();
if (!user) {
api.decorateWidget('post:after', helper => {
let h = helper.h, attrs = helper.attrs;
// console.log(attrs);
return helper.h('div.fixed-bottom-bar.d-none.d-lg-block',
[
helper.h('div.wrapper',
[
helper.h('div.logo',
helper.h('img', {
src: 'https://thuvienmuasam.com/uploads/default/original/1X/776142524c0d5c0430a603fde63a8bad2f77b267.svg',
alt: 'ThuVienMuaSam'
})
),
helper.h('div.content.d-flex.justify-content-between.ml-1',
[
helper.h('div.float-left',
[
helper.h('span.title','Добро пожаловать в Библиотеку покупок!'),
helper.h('br'),
helper.h('span.text',
[
helper.h('span','Начните '),
helper.h('a.text-primary.cursor-pointer.sign-up-button',{ href: '/signup'},
helper.h('strong','регистрацию аккаунта TVMS')
),
helper.h('span',' чтобы получить больше интересных постов от '),
helper.h('a',{ href: '/u/'+helper.attrs.username },
helper.h('strong',""+helper.attrs.username),
),
])
]),
helper.h('div.float-right.d-flex.align-items-center',
helper.h('button.btn-primary.btn',{type:'button'},
helper.h('a', { href: '/signup'},
helper.h('span.d-button-label','Присоединиться')
),
)
),
]
),
]
)
]
);
});
}
</script>
Я использовал helper.h(‘a’, { href: ‘/signup’}, но при нажатии на кнопку страница перезагружается вместо того, чтобы сразу отобразить фрейм регистрации.