From c9841b81e485a58608abfc7159e52da2232539d9 Mon Sep 17 00:00:00 2001 From: Pavel Mineev Date: Mon, 19 Apr 2021 01:15:43 +0300 Subject: [PATCH] move back css for last comments --- frontend/app/last-comments.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/app/last-comments.tsx b/frontend/app/last-comments.tsx index 57d90d1e..1a428dde 100644 --- a/frontend/app/last-comments.tsx +++ b/frontend/app/last-comments.tsx @@ -35,6 +35,11 @@ async function init(): Promise { throw new Error('Remark42: Site ID is undefined.'); } + const styles = document.createElement('link'); + styles.href = `${BASE_URL}/web/last-comments.css`; + styles.rel = 'stylesheet'; + (document.head || document.body).appendChild(styles); + (Array.from(nodes) as HTMLElement[]).forEach((node) => { const max = (node.dataset.max && parseInt(node.dataset.max, 10)) || max_last_comments || DEFAULT_LAST_COMMENTS_MAX; const locale = getLocale(window.remark_config);