parent
11aab9281b
commit
5896c35d54
10 changed files with 55 additions and 20 deletions
@ -0,0 +1,4 @@ |
||||
<div class="container smooth"> |
||||
<p class="con-title">Bienvenue sur SkamCraft</p> |
||||
<p class="con-content">Application client pour l'API Space Tarders.</p> |
||||
</div> |
@ -0,0 +1,8 @@ |
||||
<div class="container smooth"> |
||||
<p class="con-title">Login</p> |
||||
<input type="text" placeholder="agent token"> |
||||
<div class="grp-btn"> |
||||
<button>Validate</button> |
||||
<button>Cancel</button> |
||||
</div> |
||||
</div> |
@ -1,13 +1,19 @@ |
||||
import {UIRenderer} from "./ui/templeting_engine.js"; |
||||
|
||||
let UI = new UIRenderer("html"); |
||||
UI.render("templates/home.html") |
||||
|
||||
function init_menu_link(tag, template) { |
||||
UI.add_event(tag, "click", () => { |
||||
UI.render(`templates/${template}`); |
||||
})
|
||||
} |
||||
|
||||
UI.render("templates/home.html"); |
||||
|
||||
UI.add_event("#btn1", "click", () => { |
||||
UI.render("templates/test2.html"); |
||||
}); |
||||
UI.add_event("#btn2", "click", () => { |
||||
UI.render("templates/test.html"); |
||||
}) |
||||
$(document).ready(() => { |
||||
init_menu_link("#contracts-link", "contracts.html"); |
||||
init_menu_link("#ships-link", "ships.html"); |
||||
init_menu_link("#systems-link", "systems.html"); |
||||
init_menu_link("#signup-link", "register.html"); |
||||
init_menu_link("#signin-link", "login.html"); |
||||
init_menu_link(".nav-brand", "home.html"); |
||||
}); |
Loading…
Reference in New Issue