Added audio and starting cleanup

fusion
anulax1225 ago%!(EXTRA string=1 year)
parent d89274dbad
commit 87d7fb745b
  1. BIN
      assets/sounds/skamkraft_main_theme.mp3
  2. 19
      css/animation.css
  3. 32
      css/global.css
  4. 6
      html/template.html
  5. 33
      index.html
  6. 14
      js/controllers/menu_mod.js
  7. 2
      js/controllers/systems.js
  8. 15
      js/index.js
  9. 2
      js/skama_code

@ -1,8 +1,25 @@
/* Copyright © 2023 Entreprise SkamKraft */
.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;
}
}
.ext-modal[open] {
animation: myFadeIn 0.5s ease normal;
animation: myFadeIn 0.5s ease normal;
}
@keyframes myFadeIn{

@ -10,12 +10,10 @@
}
body {
margin: 0;
background-image: url("../assets/img/background.png");
background-image: url(/assets/img/backgroundfinal.png);
background-repeat: no-repeat;
background-size: 100%;
overflow-x: hidden;
font-family: pixellari;
color: var(--text-color);
}
input {
@ -34,20 +32,6 @@ select {
font-family: pixellari;
}
.container {
width: 100%;
height: inherit;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.title {
font-size: 40px;
}
.languettes {
display: flex;
flex-direction: column;
@ -59,15 +43,3 @@ select {
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;}
}

@ -1,5 +1,11 @@
<!-- Copyright © 2023 Entreprise SkamKraft -->
<main>
<audio id="audio" controls loop style="display:none" crossorigin="anonymous">
<source src="/assets/sounds/skamkraft_main_theme.mp3" type="audio/mpeg">
</audio>
<script>
document.getElementById('audio').play();
</script>
<main id="block-content"></main>
<div class="languettes" id="links"></div>
</main>

@ -1,22 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Skamkraft</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="height=device-height, initial-scale=1.0">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/auth.css">
<link rel="stylesheet" href="css/ui.css">
<link rel="stylesheet" href="css/animation.css">
<script src="js/lib/fabric.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="module" src="js/index.js" defer></script>
</head>
<body>
<head>
<title>Skamkraft</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="height=device-height, initial-scale=1.0">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/auth.css">
<link rel="stylesheet" href="css/ui.css">
<link rel="stylesheet" href="css/animation.css">
<script src="js/lib/fabric.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="module" src="js/index.js" defer></script>
</head>
<body>
</body>
</body>
</html>

@ -15,13 +15,13 @@ function init_menu(temp_engine) {
temp_engine.add_event("#systems-link", "click", () => {
systems(temp_engine);
});
temp_engine.add_event(".nav-brand", "click", () => {
temp_engine.add_event("#home-link", "click", () => {
home(temp_engine);
});
temp_engine.add_event("#logout-link", "click", () => {
My.agent = null;
localStorage.removeItem("token");
home(temp_engine);
login(temp_engine);
});
temp_engine.add_event("#contracts-link", "click", () => {
contract(temp_engine);
@ -45,16 +45,6 @@ function unloged_links() {
// `);
}
function show_stats() {
$(".stats").html(`
<p>Agent name : ${My.agent.name}</p>
<p>Credits : ${My.agent.credits}</p>
<p>Ships : ${My.agent.ships_cpt}</p>
<p>Faction : ${My.agent.faction}</p>
<p>HQ : ${My.agent.hq}</p>
`);
}
export default function menu_mod(temp_engine) {
init_menu(temp_engine);
if (My.agent) {

@ -1,4 +1,4 @@
import { CanvasRenderer } from "../skama_code/rendering/canvas_render.js";
import { CanvasRenderer } from "../skama_code/ui/canvas_render.js";
import menu_mod from "./menu_mod.js";
import { My } from "../skama_code/api/agent.js";
import { SystemBuilder } from "../skama_code/api/system.js";

@ -2,23 +2,8 @@
'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);

@ -1 +1 @@
Subproject commit 9143450f8979521f7d944f8f71e8640813235136
Subproject commit 77c805654739b07aeecccb90ee53c9126ff158a0
Loading…
Cancel
Save