From dcc6f35266de1f56d7e9536311f0ff56b57c0fdc Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 30 Nov 2024 00:33:20 +0200 Subject: More refactoring and fixing a bug on spa-router --- src/js/ui/sections/newsSection.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/js/ui/sections/newsSection.js') diff --git a/src/js/ui/sections/newsSection.js b/src/js/ui/sections/newsSection.js index 3b89cef..b983b48 100644 --- a/src/js/ui/sections/newsSection.js +++ b/src/js/ui/sections/newsSection.js @@ -1,18 +1,21 @@ import { makeElement } from "../../arching-kaos-generator.js"; -var newsSection = { - element: 'div', - id: 'news-section', - innerHTML: [ - { element: "div", className: "where-am-i", innerHTML: ` +export function newsSection() +{ + var newsSection = { + element: 'div', + id: 'news-section', + innerHTML: [ + { element: "div", className: "where-am-i", innerHTML: ` >

Modules

>

News

` }, - { element: "em", id:"news-sec-not-found", innerText: "No data found (yet?)!"} - ] -}; + { element: "em", id:"news-sec-not-found", innerText: "No data found (yet?)!"} + ] + }; -makeElement(newsSection, document.querySelector('.main')); + makeElement(newsSection, document.querySelector('.main')); +} -- cgit v1.2.3