first commit
This commit is contained in:
23
frontend/src/config/bootstrap.ts
Normal file
23
frontend/src/config/bootstrap.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import "@/styles/main.css"
|
||||
|
||||
|
||||
type BootstrapOptions = {
|
||||
activeLink?: string | null;
|
||||
onReady?: () => void | Promise<void>;
|
||||
};
|
||||
|
||||
export async function bootstrap(options: BootstrapOptions = {}): Promise<void> {
|
||||
const {
|
||||
activeLink = null,
|
||||
onReady,
|
||||
} = options;
|
||||
|
||||
if(activeLink !== null){setActiveLink(activeLink);}
|
||||
|
||||
await onReady?.();
|
||||
}
|
||||
|
||||
function setActiveLink(activeLink:string): void{
|
||||
const link = document.getElementById(activeLink);
|
||||
link?.classList.add('active');
|
||||
}
|
||||
0
frontend/src/config/ui.ts
Normal file
0
frontend/src/config/ui.ts
Normal file
9
frontend/src/pages/index/index.ts
Normal file
9
frontend/src/pages/index/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { bootstrap } from "@/config/bootstrap"
|
||||
|
||||
bootstrap({
|
||||
onReady:() => init()
|
||||
})
|
||||
|
||||
export function init(){
|
||||
console.log('index')
|
||||
}
|
||||
8
frontend/src/styles/main.css
Normal file
8
frontend/src/styles/main.css
Normal file
@@ -0,0 +1,8 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui"; /* NOSONAR */
|
||||
|
||||
:root{
|
||||
--dc-primary: rgb(34, 69, 138);
|
||||
--dc-dark-blue: rgb(0, 15, 46);
|
||||
--dc-white: rgb(255, 255, 255);
|
||||
}
|
||||
Reference in New Issue
Block a user