New commit

-  Added Audio 🎧
  -  Added system calls 🛠
  -  Started to reimplement UI 🖼
  -  Implemented skin change drop-down 👕
This commit is contained in:
Gilles Lazures 2025-04-26 12:43:03 +02:00
parent 6c4948d0b2
commit 6b33a6cb3e
8 changed files with 255 additions and 11 deletions

Binary file not shown.

View File

@ -0,0 +1,110 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://cdn.jsdelivr.net/gh/hung1001/font-awesome-pro@4cac1a6/css/all.css");
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
body {
background-image: url("../img/index_wallpaper.gif");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
}
main {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
width: 100%;
height: 100%;
}
main > nav {
margin-left: 1rem;
width: 20%;
height: 100%;
background-color: #3e3e3ee6;
}
main > nav > img {
width: 70%;
margin-left: 15%;
margin-top: 3%;
margin-bottom: 10px;
}
details > article {
margin-left: 20px;
margin-right: 20px;
margin-top: 5px;
background-color: #343434;
padding: 7px 7px 7px 7px;
color: #ffffff;
box-shadow: rgba(0, 0, 0, 0.5) 0px 3px 8px;
}
details > summary {
text-align: center;
list-style: none;
}
button.nav {
position: relative;
width: 100%;
height: 40px;
border: none;
font-size: large;
text-align: left;
padding: 13px 13px 13px 13px;
margin-bottom: 10px;
background-color: transparent;
}
button.nav > i {
position: relative;
width: 35px;
height: 35px;
margin-left: 8px;
text-align: center;
padding-top: 0.67rem;
border-radius: 10px;
vertical-align: middle;
background-color: gray;
}
button.nav > span {
margin-left: 12px;
color: #ffffff;
}
fieldset {
font-size: small;
border: none;
}
fieldset > legend {
font-weight: bolder;
margin-bottom: 5px;
}
input[type=radio] {
accent-color: #12865c;
}
button.classic {
width: 96%;
height: 30px;
margin-left: 2%;
margin-top: 5px;
border: none;
color: #ffffff;
border-radius: 5px;
background-color: #39aa6d;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

19
app/assets/js/inex.js Normal file
View File

@ -0,0 +1,19 @@
const audio = new Audio()
function startAudio() {
audio.src = "/app/assets/audio/Golden Hill (Radio Edit).mp3"
audio.loop = true
audio.onended = () => {
if (!audio.paused) {
audio.play()
}
}
}
function muteAudio() {
audio.muted = true
}
function unmuteAudio() {
audio.muted = false
}

View File

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>

121
app/logged.html Normal file
View File

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./assets/css/index.css">
<title>Document</title>
</head>
<body>
<main>
<nav>
<img src="./assets/img/logo_no_blanc.png" alt="">
<details>
<summary>
<button class="nav" onclick="this.parentNode.click()">
<i class="fas fa-rocket"></i>
<span>
Launcher
</span>
</button>
</summary>
<article>
<p>
a
</p>
</article>
</details>
<details>
<summary>
<button class="nav" onclick="this.parentNode.click()">
<i class="fas fa-gamepad"></i>
<span>
Jeu
</span>
</button>
</summary>
<article>
<p>
a
</p>
</article>
</details>
<details>
<summary>
<button class="nav" onclick="this.parentNode.click()">
<i class="fas fa-music-alt"></i>
<span>
Musique
</span>
</button>
</summary>
<article>
<p>
a
</p>
</article>
</details>
<button class="nav" onclick="system.openInBrowser('https://discord.com/invite/catboatandrot')">
<i class="fab fa-discord"></i>
<span>
Discord
</span>
</button>
<details>
<summary>
<button class="nav" onclick="this.parentNode.click()">
<i class="fas fa-tshirt"></i>
<span>
Skin
</span>
</button>
</summary>
<article>
<fieldset>
<legend>
Type de skin
</legend>
<div>
<input type="radio" id="classic" name="type" value="classic" checked />
<label for="classic">Classic (Steve)</label>
</div>
<div>
<input type="radio" id="slim" name="type" value="slim" checked />
<label for="slim">Slim (Alex)</label>
</div>
</fieldset>
<button class="classic" onclick="system.call('skin::set')">
Choisir le fichier
</button>
<button class="classic" onclick="system.call('skin::validate')">
Valider
</button>
</article>
</details>
<button class="nav" onclick="system.openInBrowser('https://catboat.fr')">
<i class="fas fa-siren-on"></i>
<span>
Police
</span>
</button>
<button class="nav" onclick="system.openInBrowser('https://catboat.fr')">
<i class="fas fa-books"></i>
<span>
Wiki
</span>
</button>
<button class="nav">
<i class="fas fa-terminal"></i>
<span>
Console
</span>
</button>
</nav>
</main>
<script src="./assets/js/inex.js"></script>
</body>
</html>

5
modules/preload.js Normal file
View File

@ -0,0 +1,5 @@
const { shell, contextBridge } = require("electron")
contextBridge.executeInMainWorld("system", {
openInBrowser: (url) => shell.openExternal(url)
})