diff --git a/assets/menu/contracts.png b/assets/menu/contracts.png new file mode 100644 index 0000000..233bd08 Binary files /dev/null and b/assets/menu/contracts.png differ diff --git a/assets/menu/home.png b/assets/menu/home.png new file mode 100644 index 0000000..333e527 Binary files /dev/null and b/assets/menu/home.png differ diff --git a/assets/menu/info.png b/assets/menu/info.png new file mode 100644 index 0000000..5f40e33 Binary files /dev/null and b/assets/menu/info.png differ diff --git a/assets/menu/leaderboard.png b/assets/menu/leaderboard.png new file mode 100644 index 0000000..815bf69 Binary files /dev/null and b/assets/menu/leaderboard.png differ diff --git a/assets/menu/ships.png b/assets/menu/ships.png new file mode 100644 index 0000000..4bc000b Binary files /dev/null and b/assets/menu/ships.png differ diff --git a/css/auth.css b/css/auth.css index 7d108f0..0472f79 100644 --- a/css/auth.css +++ b/css/auth.css @@ -38,4 +38,11 @@ background-color: darkgreen; } -.auth-select {} \ No newline at end of file +.auth-select { + margin-top: 1vh; + border-radius: 3px; +} + +.errors { + color: red; +} \ No newline at end of file diff --git a/css/global.css b/css/global.css index c0ba70b..e0c6fb4 100644 --- a/css/global.css +++ b/css/global.css @@ -12,6 +12,8 @@ body { margin: 0; background-image: url("../assets/img/background.png"); + background-repeat: no-repeat; + overflow-x: hidden; font-family: pixellari; color: var(--text-color); } @@ -44,4 +46,28 @@ select { .title { font-size: 40px; +} + +.languettes { + display: flex; + flex-direction: column; + align-items:flex-end; + margin: 250px -50px 0px 0px ; +} + +.languettes input{ + width: 5%; +} + +.languettes input:hover{ + animation: slide-left; + position: relative; + animation-timing-function: ease; + animation-fill-mode: forwards; + animation-duration: 1s; +} + +@keyframes slide-left { + 0% {right: 0px; top: 0px;} +100% {right: 25px; top: 0px;} } \ No newline at end of file diff --git a/css/system.css b/css/system.css deleted file mode 100644 index e69de29..0000000 diff --git a/html/template.html b/html/template.html index c34d499..d894437 100644 --- a/html/template.html +++ b/html/template.html @@ -1,2 +1,5 @@ -
\ No newline at end of file +
+
+ +
diff --git a/html/templates/auth/reg.html b/html/templates/auth/reg.html index 956423a..01b2e46 100644 --- a/html/templates/auth/reg.html +++ b/html/templates/auth/reg.html @@ -3,10 +3,10 @@

New Agent

- +

Remember me ?

diff --git a/js/controllers/menu_mod.js b/js/controllers/menu_mod.js index 5d9bfb3..55a117a 100644 --- a/js/controllers/menu_mod.js +++ b/js/controllers/menu_mod.js @@ -29,19 +29,20 @@ function init_menu(temp_engine) { } function loged_links() { - $(".nav-links").html(` - - - - + $("#links").html(` + + + + + `); } function unloged_links() { - $(".nav-links").html(` - - - `); + // $(".menu-links").html(` + // + // + // `); } function show_stats() { diff --git a/js/controllers/reg.js b/js/controllers/reg.js index b284dfa..57b5543 100644 --- a/js/controllers/reg.js +++ b/js/controllers/reg.js @@ -2,6 +2,7 @@ import { Auth } from "../skama_code/auth/auth.js"; import { My } from "../skama_code/api/agent.js"; import { Faction } from "../skama_code/api/faction.js" import home from "./home.js"; +import login from "./login.js"; import menu_mod from "./menu_mod.js"; export default function reg(temp_engine) { @@ -18,17 +19,21 @@ export default function reg(temp_engine) { }); temp_engine.add_event("#btn-register", "click", () => { - const is_checked = $("#box-remember").is(":checked"); - const symbol = $("#input-name").val(); - const faction = $("#input-faction").val(); + const is_checked = $("#in-remember").is(":checked"); + const symbol = $("#in-name").val(); + const faction = $("#in-faction").val(); auth.store = is_checked; auth.register({name: symbol, faction: faction}); }); temp_engine.add_event("#btn-cancel", "click", () => { - $("#input-name").val(""); - $("#box-remember").prop("checked", false); + $("#in-name").val(""); + $("#in-remember").prop("checked", false); }); + + temp_engine.add_event("#btn-log", "click", () => { + login(temp_engine); + }) }); auth.done((agent) => { diff --git a/js/index.js b/js/index.js index c687061..42ab380 100644 --- a/js/index.js +++ b/js/index.js @@ -2,8 +2,23 @@ 'use strict'; import { TemplateEngine } from "./skama_code/ui/templeting_engine.js"; import login from "./controllers/login.js"; +import home from "./controllers/home.js"; +import { Auth } from "./skama_code/auth/auth.js"; +import { AgentBuilder } from "./skama_code/api/agent.js"; +import { My } from "./skama_code/api/agent.js"; let temp_engine = new TemplateEngine("html"); + +//Auto login +const auth = new Auth(); + +if (auth.relog()) { +AgentBuilder.get(localStorage.getItem("token"), (agent) => { + My.agent = agent; + home(temp_engine); +}); +} + login(temp_engine);